473,657 Members | 2,735 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_REFER ER" 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 2777
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*****@mailci ty.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_REFER ER" 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
10597
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
9192
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 by lnk2_Click(). The others return to their original values initiated during their declaration. But the static variable's life doesn't end when the page is closed and it causes
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 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...
3
1335
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 and/or could someone post a quick example of how to store and retrieve? Thanks in advance. Mark
6
5822
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
2370
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 issues. Could you conceivably store a serialized object containing state information in a hidden form field, and pass it from page to page to page avoiding the use of cookies and session data? Thanks.
23
14503
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 the visitors will retype it all so i'm asking: "how to preserve POST-data when clicking the back-button?" i've already tried to print post data as a value in a HTML tag but
1
1818
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 example, if I have a page with some date controls so I can choose a date range and postback the page. It then displays results based on that date range. When I leave the page for another page, I would like to have the Previous Page link take them...
13
9604
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 these be kept when returning? I'm very grateful for fast response. // S
0
8833
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8737
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8610
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7345
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5636
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4168
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4327
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1967
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1730
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.