• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

List Controls

As with every other group of server controls, it pays for us to first take a look at the parent of all these controls. This group’s Mama and Dada is the ListControl class, which is located in the System.Web.UI.WebControls namespace. Table 9.1 displays the ListControl’s properties. It also has one method that the other list controls will inherit.

Table 9.1. ListControl Object Properties
Property Description
AutoPostBack Gets or sets a value indicating whether a postback to the server automatically occurs when the user changes the list selection.
DataMember Gets or sets the specific table in the datasource to bind to the control.
DataSource Gets or sets the data source that is used to populate the items of the list control.
DataTextField Gets or sets what field in the data source provides the text content of the list items.
DataTextFormatString Gets or sets the formatting string that controls the format of the data bound to the list control.
DataValueField Gets or sets what field in the data source provides the value of each list item.
Items Gets the collection of items in the list control.
SelectedIndex Gets or sets the lowest index of the items selected in the list.
SelectedItem Gets the item selected with the lowest index in the list control.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint