Item in a dropdown list can be selected by using either of the following lines:
- DropDownList1.SelectedIndex = DropDownList1.Items.IndexOf(DropDownList1.Items.FindByText(<Enter here Text>));
- DropDownList1.SelectedIndex = DropDownList1.Items.IndexOf(DropDownList1.Items.FindByValue(<Enter here value>));
No comments:
Post a Comment