preserve previous page state - asp.net

S

sri_san

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.
 
G

Guest

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!
***************************
 

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

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top