Click here to Skip to main content
15,918,574 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a dropdownlist and i am binding value 1 to 60 and the default value is <--Select--> with value "". I have fired the
OnSelectedIndexChanged
event because of some server side code. When i am going to insert a new recode then it working fine but when i am updating any record then it showing error.

Cannot have multiple items selected in a DropDownList.


What I have tried:

I have tired
ddl.ClearSelection();

ddl.Items.FindByValue("4").Selected = true;


But when i want to view a record it should be in Default Mode.

I have tired to show in default mode by providing the Default value in the place of "4" but it showing the same error.
Posted
Comments
Karthik_Mahalingam 28-Feb-17 7:13am    
post the code block

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900