Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
we are making an application in asp.net(visual studio 2008). In this we have made a page in which we have a submit button. on clicking on this submit button we go to next page.on this next page we have a back button.we want that when we click on this back button then the values that we have entered in the previous page it should display the values that which we have filled.
please give the solution
Posted
Updated 18-Jan-13 1:42am
v3

You can use

Hidden Form Fields
Query Strings
UrlData
Cookies
Session Variables
Application Variables
Cache

to store your values between redirects and transfers.
and in turn can use these values to fill the form again
in my opinion sessions are safe n easy to handle.
 
Share this answer
 
v2
Comments
Zafar Sultan 18-Jan-13 8:05am    
Hello, I have striked last two possible options as using this method will cause dirty read problem. Data stored in Application Variables and Cache is available to all the users of the application. This may result in incorrect data when fetched on coming back. No hard feelings.
Hello
Simple Way You can used

first click button perform Empty all controls then respose.redirect after you click this page back button your page not preserved any value.
 
Share this answer
 
Comments
Tiwari Avinash 18-Jan-13 7:57am    
hey rizwan she is trying to retain the values not to clear the fields if I'm not getting her wrong. wat say?

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