1 / 9

DropDownList

DropDownList. The ListItem control supports the following five properties: Attributes Enables you to add HTML attributes to a list item. Enabled Enables you to disable a list item. Selected Enables you to mark a list item as selected.

suki
Download Presentation

DropDownList

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. DropDownList

  2. The ListItem control supports the following five properties: • Attributes Enables you to add HTML attributes to a list item. • Enabled Enables you to disable a list item. • Selected Enables you to mark a list item as selected. • Text Enables you to specify the text displayed by the List Item. • Value Enables you to specify a hidden value associated with the List Item.

  3. Displaying options with the List controls is all very nice, but at some point you need to be able to determine which option a user has selected. The List controls support three properties that you can use to determine the selected list item: • SelectedIndex Gets or sets the index of the selected list item. • SelectedItem Gets the first selected list item. • SelectedValue Gets or sets the value of the first selected list item.

  4. ListBox • The ListBox control is similar to the DropDownList control with two important differences. First, the ListBox control requires more screen real estate because it always displays a certain number of list items. Furthermore, unlike the DropDownList control, the ListBox control enables a user to select multiple items.

More Related