13
Answers

how to set index of dropdownlist

Dharmesh sharma

Dharmesh sharma

12y
2.2k
1
hello,

 in my webpage i boud dropdowdlist by sqldatasource.
now i wan to set the selected item 3 of this dropdwonlist

for example:dropdownlist bound with sqldatasource and dropdownllist has a,b,c,d

now i want to search the item in dropdownlist b then select b on page load

how i do that my code not working

i use this code on page load

dropdownlist.SelectedIndex=convert.toint32(dropdownlost.items.findbytext("b").text);

not working

Answers (13)