By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,783 Members | 1,154 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,783 IT Pros & Developers. It's quick & easy.

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

P: n/a
Nad
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?

Nov 19 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
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.

Nad wrote:
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?

Nov 19 '05 #2

P: n/a
Not clear.

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

Patrice

--

"Nad" <Na*@discussions.microsoft.com> a écrit dans le message de
news:DE**********************************@microsof t.com...
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?

Nov 19 '05 #3

P: n/a
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

Nov 19 '05 #4

P: n/a
Nad
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?

"Patrice" wrote:
Not clear.

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

Patrice

--

"Nad" <Na*@discussions.microsoft.com> a écrit dans le message de
news:DE**********************************@microsof t.com...
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?


Nov 19 '05 #5

P: n/a
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.

--
Patrice

"Nad" <Na*@discussions.microsoft.com> a écrit dans le message de
news:FE**********************************@microsof t.com...
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?

"Patrice" wrote:
Not clear.

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

Patrice

--

"Nad" <Na*@discussions.microsoft.com> a écrit dans le message de
news:DE**********************************@microsof t.com...
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?


Nov 19 '05 #6

P: n/a
Nad
Thank you Aaron,

It's a good idea. I will take it into consideration.

"Aaron Corcoran" wrote:
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

Nov 19 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.