How to keep entries intact when going BACK to a web page

G

Guest

Hello,

In order to go back to the previous page from a page with possible postbacks
I keep Request.Referrer in ViewState and then use it to redirect to the
previous page. However I am losing all the information entered in the
previous page. I also want to keep the entries in many fields/controls in the
previous page.

Is there a way to keep the information in the previous page intact when you
get back to it?
 
E

Elliot M. Rodriguez

Response.redirect creates a new page instance and causes another
server/client roundtrip, and it will behave as if its a first time call
to a page. Thats why youre losing your control's values.
 
P

Patrice

Not clear.

Where are recorded the value entered in the previous page ? Nowhere ? If yes
just recreate the page with those stored values...

Patrice
 
A

Aaron Corcoran

Nad,

I am not sure how your application is set up, but one way you might
want to handle the multiple pages is to simply give the illusion of
separate pages using panels, allowing you to show and hide the various
panels without losing the user's inputted data. Of course, if this
is not possible, you will have to repopulate the various pages, as far
as I know.

I hope this helps,
Aaron
 
G

Guest

Hi Patrice,

The user has made entries in the previous page's controls. So when I go back
I lose them. I guess the best way to store these entries would be via session
variables right?
 
P

Patrice

For now I don't understand the exact scheme. When talking about the
"previous" page do you mean the "back" button of the browser ?

Or is this something like :
- enter some data on a page
- click a link to display another page in the same window
- click a link to "go back" to the "previous" page

Remember that each page lives as long as it is displayed. In this case you
would have to keep those values around so that you are able to display again
the page.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top