Click here to Skip to main content
16,018,202 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
1.I have 2 pages,p1.aspx and p2.aspx.
2.i Enter some data in p1.aspx and navigate to p2.aspx
3. when i come back to p1.aspx from p2.aspx, I want to see the data in p1.aspx which i
had entered earlier

How it posible????
i am using c#
Posted

You need to look at state management in ASP.Net.
There is a lot of information for this on the internet.

I'm sure you will find the best links. For starters, try this[^].
 
Share this answer
 
The only way you can do it is to store it, either in a cookie, or server side. It depends on how you navigate which way is best for you: a link might be best handled in JS and cookied, a redirect from the server could be best handled by storing it server side - it depends on whether you have logged users in, or casuals - casuals would need the cookie approach even from the server side re-direct.
 
Share this answer
 
Understand the lifecycle of an ASP.NET page. Once it has been served to the browser the server knows nothing more about it unless you tell it. You need to persist the data in some fashion, either a database or perhaps session state.
 
Share this answer
 
It depends on how you get back to page 1. If you use a link on page 2 to navigate back to page 1 then implementing session variable usage is an easy way to do this. If you are using the back button on the browser you will have some other issues, but I have dealt with that using session variables as well in the past.
 
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