473,503 Members | 1,979 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

preserve previous page state - asp.net

Hello,
I am working on a website where I need to navigate to the
previous page once the user clicks on "back" button. I store the
previous page from the "HTTP_REFERER" Server variable and the back
works fine. But unfortunately, I am not able to have the user
selections preserved on the previous page.
Another solution I tried was to user javascript's history method.It
does not work for some reason as it asks to refresh the page from the
server.

Looking for a solution to do the job without saving the previous page
user selection in session variables.

Thanks,
Sam.

Nov 19 '05 #1
1 2764
You will have to persist the information in ViewState somewhere to allow this
functionality. A session static property bag is probably the easiest method.
Simply store any dataSets and the chosen values in the bag and empty after
you reconstitute the page, refill if they navigate off to page 2.

If this is a multi-page form, consider placing all parts on one page, each
in a panel. Still appears multi-page, but the state of each control is held
in viewstate. This makes it easy to nav forward and back.
---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************

"sr*****@mailcity.com" wrote:
Hello,
I am working on a website where I need to navigate to the
previous page once the user clicks on "back" button. I store the
previous page from the "HTTP_REFERER" Server variable and the back
works fine. But unfortunately, I am not able to have the user
selections preserved on the previous page.
Another solution I tried was to user javascript's history method.It
does not work for some reason as it asks to refresh the page from the
server.

Looking for a solution to do the job without saving the previous page
user selection in session variables.

Thanks,
Sam.

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
10587
by: Tee | last post by:
Hi, How do we increase the size of array on runtime and preserve the previous data? I don't want to use ArrayList because the array could be a multi-dimension array. Thanks, Tee
8
9175
by: hb | last post by:
Hi, I need to declare a variable who's value can be preserve through the same ASP.Net page. I tried the following code, only the static variable s2 keeps its value=22 after lnk1_Click followed...
0
260
by: sri_san | last post by:
Hello, I am working on a website where I need to navigate to the previous page once the user clicks on "back" button. I store the previous page from the "HTTP_REFERER" Server variable and the...
3
1323
by: Mark | last post by:
I'm aware of how to preserve state using session, application variables, view state, query strings, etc. I'm told that you can use POST to do a similar state preservation. How does this work...
6
5810
by: bill | last post by:
Is there a way to retrieve values from the viewstate in the previouspage using cross page postback? Thanks! Bill
4
2362
by: Mark | last post by:
Assume you have a web application with many different web pages, and you'd like to avoid using cookies and storing session state in any form. Assume further that bandwidth and security are not...
23
14450
by: Bjorn | last post by:
Hi. Every time i post data in a form the contents are being checked for validity. When i click the back-button, all data is gone and i have to retype it. It's obvious that only a few or none of...
1
1802
by: Jeff | last post by:
I need to place a "Previous Page" link on every page within my site and a simple javascript:history.back() will not work because I need it to capture the state of the page when I left it. For...
13
9577
by: staeri | last post by:
I use javascript:history.go(-1) to return to the previous page. I've now found out that when returning to the previous page all selections that the user made in dropdownlists are lost. How can...
0
7093
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7287
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7348
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
5021
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4685
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3175
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3166
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1519
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
744
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.