ListBox control
ASP.NET ListBox Control
Web server control
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.
Web Server Control