I think there was another post about this in this forum, so I aplogize if I am repeating. I did a pretty exhaustive search and came up with nothing, so I am going ahead and asking.
I have a populated dropdownlistbox. In a later subroutine I want to pick one of the items from the list and set that as the selected item. I want to select the item by the selecteditem.value.
So, I tried:
This resulted in setting the value of the item that was already selected to my variable. When I wanted to have the item.value that matched my variable be the one selected.
Thanks!
Eva
I have a populated dropdownlistbox. In a later subroutine I want to pick one of the items from the list and set that as the selected item. I want to select the item by the selecteditem.value.
So, I tried:
Code:
DropDownList.SelectedItem.Value = MyVariable
This resulted in setting the value of the item that was already selected to my variable. When I wanted to have the item.value that matched my variable be the one selected.
Thanks!
Eva