Adsence750x90

Monday, August 25, 2008

Avoid dropdownlist multiple selection problem

How to avoid Multiple selection not allowed in DropDownList problem

i get one error when i compile my program, the error message is multiple section of DropDownList is not allowed, i debug my program but i didn't get any multiple section on in DropDownList. i use one update panel for AJAX operations. i think that error come from some unwanted selection of update panel. finally i remove that error by using

DropDownList1.ClearSelection(); then is add
DropDownList1.Items[3].Selected=true;

it works fine cant get any errors after that.
to avoid this use DropDownList1.ClearSelection(); then add selection of DropDownList.