Click here to Skip to main content
15,914,452 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to get selected value of select tag in ASP?
and when page reload select tag start with starting value
plz reply me
Posted
Comments
Om Prakash Pant 18-May-11 7:23am    
you mean to get the selected value of listbox in asp.net?

1 solution

Your question is not framed well - statement, tags etc. Yet, it sounds like you are working on a Web application and the dropdown is resetting on postback. It must be because of rebinding of dropdown on postback. Just use VS DEBUGGER and you will it by yourself. If you are talking of ASP.NET, you can use Page property IsPostback in order to avoid the rebind on postback.

Once this is done, you can get the value selected using SelectedIndex/SelectedValue or so depending on the control you are using. Just do a quickwatch on the dropdown and one of the properties shoould hold the selected value.

Try!
 
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