ASP.NET ListItem Control

Definition and Usage

The ListControl control provides all basic functions for list controls. Controls that inherit from this control include CheckBoxList, DropDownList, ListBox, and RadioButtonList classes.

The properties of the ListControl class allow you to specify the data source used to fill the list control.

Properties

The following table describes the properties inherited from the Control class:

Properties Description .NET
AppendDataBoundItems Gets or sets a boolean value that indicates whether list items are cleared before binding data. 2.0
AutoPostBack Gets or sets a value that indicates whether an automatic postback to the server is performed when the selected content in the list is changed by the user. 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 text content for list items. 1.0
DataTextFormatString The formatting string used to specify how list data is displayed. 1.0
DataValueField The data source field that provides values 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 lowest sequential index number 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 that is 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