ListBox control
ASP.NET ListBox Control
![1478659305940638.gif up.gif](http://img.php.cn/upload/image/672/770/384/1478659305940638.gif)
Definition and usage
ListBox control Create a drop-down list with multiple selections.
Each selectable item in the ListBox control is defined through the ListItem element!
Tips: This control supports data binding!
Properties
Properties | Description | .NET |
---|---|---|
Rows | The number of rows displayed in the list. | 1.0 |
SelectionMode | Allow single selection or multiple selection. | 1.0 |
ListControl Standard Properties
The ListControl control includes all the basic functionality of a list control. Controls that inherit from this control include the CheckBoxList, DropDownList, ListBox, and RadioButtonList controls.
For a complete description, visit the ListControl standard properties.
Web control standard properties
For a complete description, visit Web Control Standard Properties.
Control standard properties
For a complete description, visit Control Standard Properties.
Example
Listbox
In this example, we declare a ListBox control in the .aspx file. We then created an event handler that displays the text and selected item in the Label control when the Click event occurs.
![1478659313708256.gif up.gif](http://img.php.cn/upload/image/326/316/931/1478659313708256.gif)