I have a dropdown list, and I want to set it's selected index on load, but I cant figure out how to select an item by its value vs it's index(because value is read only)... nothing special, just the standard ddl. I'm using C# as well... I've tried a few things, one that I felt i was getting somewhere is shown below:
ListItem selectedItem = videoList.Items.FindByValue(incommingVideoID); videoList.SelectedIndex = videoList.Items.IndexOf(selectedItem);
None of the others really seemed to be going anywhere so I'll just leave em out... please help...
This post has been edited by W3bDev: 30 September 2009 - 07:00 AM