Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

ASP.NET DropDownList SelectedIndex Property

ASP.NET DropDownList SelectedIndex Property


DropDownList Control DropDownList control


Definition and Usage

The SelectedIndex property is used to get or set the index number of the selected item in the DropDownList.


Example

The following example outputs the text of the selected item:

Select a name from the list:

  

  

  

  

  

OnClick="GetName" Runat="Server" />


Name is:

Demo Example »


DropDownList Control DropDownList control