To change the selected index of a dropdown list already populated if Value or text is known
myDropDown.SelectedIndex = myDropDown.Items.IndexOf(myDropDown.items.findbytext(strCurrentState))
myDropDown.SelectedIndex = myDropDown.Items.IndexOf(myDropDown.items.findbyvalue(strCurrentState))
No comments:
Post a Comment