DropDownList.SelectedIndex Property
.NET Framework 3.0
Gets or sets the index of the selected item in the DropDownList control.
Namespace: System.Web.UI.WebControls
Assembly: System.Web (in system.web.dll)
Assembly: System.Web (in system.web.dll)
public: virtual property int SelectedIndex { int get () override; void set (int value) override; }
/** @property */ public int get_SelectedIndex () /** @property */ public void set_SelectedIndex (int value)
public override function get SelectedIndex () : int public override function set SelectedIndex (value : int)
Not applicable.
Property Value
The index of the selected item in the DropDownList control. The default value is 0, which selects the first item in the list.Use the SelectedIndex property to programmatically specify or determine the index of the selected item from the DropDownList control. An item is always selected in the DropDownList control. You cannot clear the selection from every item in the list at the same time.
Note: |
|---|
| The indexes for the items in the DropDownList control are zero-based. |
Community Additions
ADD
Show:
Note: