Click here to Skip to main content
15,891,725 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
My drop down list contains 3 items:
1. Select
2. Yes
3. No

Once I select "Yes" and save it, the next time the "Yes" value is repeated and I cannot change the selection.
Posted
Updated 2-Sep-13 23:04pm
v3
Comments
André Kraak 3-Sep-13 5:03am    
Please DO NOT SHOUT when asking a question. When you use all capital letters it is seen as shouting on the Internet and considered rude. Next time when posting a question please use proper capitalization.

Thanks.
Avandhika 3-Sep-13 5:06am    
I am sorry fro that,i use capital letters for fast reply for the question .
OriginalGriff 3-Sep-13 5:04am    
DON'T SHOUT. Using all capitals is considered shouting on the internet, and rude (using all lower case is considered childish). Use proper capitalisation if you want to be taken seriously.
Avandhika 3-Sep-13 5:07am    
Now i realize my fault.thanks
OriginalGriff 3-Sep-13 5:19am    
"i use capital letters for fast reply"
Bad idea. All upper case is counted as shouting on the whole internet, and if you want help, it's not a good idea to annoy people first...
http://en.wikipedia.org/wiki/Netiquette#Netiquette

After saving change the selected index of the DropDownList as below.
JavaScript
DropDownListID.SelectIndex = -1 ;

or
JavaScript
DropDownListID.selectValue = 1 // if u want to 1.Select 
 
Share this answer
 
Comments
Avandhika 3-Sep-13 5:20am    
Thanks
After saving select value not changed for that use

C#
DropDownListID.SelectIndex =0;


or

C#
DropDownListID.selectValue ="0";
 
Share this answer
 
Comments
Avandhika 5-Sep-13 5:22am    
The selected value should display in drop down list for next time of editing is my requirment.

thanks

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