Click here to Skip to main content
15,886,518 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a dropdownlist1 and a submit button.
dropdownlist contents and order as following
1.select
2.city
3.country
I have selected city and click the button after clicking the button dropdownlist should be above order.
Posted
Comments
Prince Antony G 17-Nov-11 3:57am    
Need more Details please.
Mycroft Holmes 17-Nov-11 3:59am    
You are going to have to try and state your question more clearly, it does not make sense at the moment.
palraj001 17-Nov-11 4:00am    
now what order is it coming after button click?
sriman.ch 17-Nov-11 4:21am    
Please be more specific...

Suppose the dropdownlist contains the follwing sequence
VB
1.Select 
2.city
3.country


You are selecting city and click on button then the order should be like once again same as above.

To do the same
Write the following code on the button click event.

this.DropDownList1.ClearSelection();

After clicking on the button you will get the same sequence as above.
 
Share this answer
 
C#
DropDownList1.ClearSelection();
 
Share this answer
 
C#
Dropdownlist1.Selectedindex =0
 
Share this answer
 
v2

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