If I have a dropdown list like this below, where 0,1,2,3, ect are the index numbers. Say I have selected index 2. How would I store the text in index 1 in a variable? so if I select 2005. I want to store 2004 in a variable.
sorry was a bit confused
then do a ddl_whatever.items.findbyvalue(ddl_whatever.SelectedItem.Value) to determine the selectedindex of the current item subtract one- ensure you are within the valid range >=0 and <=number of items in the dropdownlist
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.