ASP.NET C#: DropDownList SelectedIndex

A dropdown’s SelectedIndex property is the number (int) of the line item selected, 0 for the first, 1 for the second, regardless of data.

Example:

if(ddlCustomer.SelectedIndex == 0){
     Response.Write("Hello World.");
}
, , , , ,

Leave a Reply

You must be logged in to post a comment.