ASP.NET ListControl Control
Web Server Controls
Definition and Usage
The ListControl control provides all the basic functionality for list controls. Controls that inherit from it include: CheckBoxList, DropDownList, ListBox, and RadioButtonList classes.
The properties of the ListControl class allow you to specify the data source used to populate the list control.
property
| property | Description | .NET |
|---|---|---|
| AppendDataBoundItems | Gets or sets a Boolean value that indicates whether to clear list items before binding data. | 2.0 |
| AutoPostBack | Gets or sets a value that indicates whether to automatically post back to the server when the user changes the selection in the list. | 1.0 |
| CausesValidation | Specifies whether the page is validated when an item in the list control is clicked. | 2.0 |
| DataTextField | The data source field that provides the text content for list items. | 1.0 |
| DataTextFormatString | A format string used to specify how to display list data. | 1.0 |
| DataValueField | The data source field that provides the value for each list item. | 1.0 |
| Items | The collection of list control items in the list. | 1.0 |
| runat | Specifies that the control is a server control. Must be set to "server". | 1.0 |
| SelectedIndex | The ordinal index of the selected item in the list. | 1.0 |
| SelectedItem | The text of the selected item in the list. | 1.0 |
| SelectedValue | The value of the selected item in the list. | 1.0 |
| TagKey | 1.0 | |
| Text | The value of the selected item in the list. | 2.0 |
| ValidationGroup | The control group validated when a postback occurs. | 2.0 |
| OnSelectedIndexChanged | The name of the function executed when the index of the selected item is changed. | 1.0 |
Web Server Controls