ASP.NET ListBox control
Definition and Usage
ListBox control is used to create multiple choice, but choose goods drop-down list.
ListBox control each selectable item is defined by ListItem element!
Note: The control supports data binding!
Attributes
属性 | 描述 | .NET |
---|---|---|
Rows | 在列表中显示的行数。 | 1.0 |
SelectionMode | 允许单选还是多选。 | 1.0 |
ListControl standard attributes
ListControl control covers all the basic functions of a list control. Controls inherit from this control include: CheckBoxList, DropDownList, ListBox and RadioButtonList control.
For a full description, visit the ListControl standard attributes .
Web Control Standard Properties
For a full description, visit the Web Control Standard Attributes .
Control Standard Properties
For a full description, go to Control Standard Attributes .
Examples
Listbox
In this example, we declare a ListBox control in an .aspx file. Then we create an event handler, when the Click event occurs, the handle text and displays the selected item in the Label control.
Web server control