473,399 Members | 3,888 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

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 2757
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
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
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
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
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
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
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
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
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
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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...

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.