ASP.NET ListBoxControl
Web Server Control
Definition and Usage
The ListBox control is used to create a drop-down list that allows single or multiple selection.
Each selectable item in the ListBox control is defined by a ListItem element!
Tip:This control supports data binding!
Attributes
| Attributes | Description | .NET |
|---|---|---|
| Rows | The number of rows displayed in the list. | 1.0 |
| SelectionMode | Whether to allow single or multiple selection. | 1.0 |
ListControl Standard Properties
The ListControl class contains all the basic functionality of list controls. Controls that inherit from this control include: CheckBoxList, DropDownList, ListBox, and RadioButtonList controls.
For a full description, please visitListControl Standard Properties。
Web Control Standard Properties
For a full description, please visitWeb Control Standard Properties。
Control Standard Properties
For a full description, please visitControl Standard Properties。
Examples
Listbox
In this example, we declare a ListBox control in an .aspx file. Then we create an event handler that displays the text and selected item in a Label control when a Click event occurs.
Web Server Control Other Extensions