Click here to Skip to main content
15,915,702 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Title:Not able to retain the values in a session drop-down list

On logging-in the website, selecting input values from a drop-down list, a grid view appears. On selecting a link from the grid-view, control is rightly transferred to the next-page. But on clicking the back-button (designed on the page), the previous grid-view rightly appears but the input values in the drop-down list are gone, which I want to be displayed or selected.

Please suggest a solution.
Posted
Updated 26-Aug-11 1:09am
v2
Comments
Ankur\m/ 8-Aug-11 0:43am    
It's difficult to say anything without seeing your code. But let me ask you few things which may cause this behaviour -
how are you redirecting when user clicks back button? Does the code which fills the drop down list inside Pages's !IsPostback property?
Please add "relevant" code by clicking 'Improve Question' link to get more help.
Anil Honey 206 26-Aug-11 7:49am    
With Out Seeing The Code we Cant Analize The Code.

1 solution

hi
I am agree on ankur's point it is difficult to say without seeing a code.
but still if you keep your dropdown value in session or in querystring.
and redirct to other and when you press a back button check from which page you are redirecting. if you redirect from the selected link button then assign the selected value of the dropdown as session value or querystring value otherwise keep it default.It is better if you keep it in session & removed it when you will redirecting to other page not from link button
 
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