Page Expired/Back Button

J

James

I'm getting the Warning: Page has Expired message when I hit the back button
on my browser. I realize why this is happening, but ultimately this is
going to severely annoy our client. Is there a *decent* workaround?
Basically I have a DataGrid that has a bunch of checkboxes in it. These
checkbxoes control a DataSet in Session memory and when they are clicked, it
causes a postback. Once they submit this to another page and I try to
navigate back, I get this error.

My client is going to hit the back button, this is a foregone conclusion.
How do I get them back to the original page without this warning, even if I
have to "lose" their previous selections?
 
J

Joerg Jooss

James said:
I'm getting the Warning: Page has Expired message when I hit the back
button on my browser. I realize why this is happening, but
ultimately this is going to severely annoy our client. Is there a
decent workaround? Basically I have a DataGrid that has a bunch of
checkboxes in it. These checkbxoes control a DataSet in Session
memory and when they are clicked, it causes a postback. Once they
submit this to another page and I try to navigate back, I get this
error.

My client is going to hit the back button, this is a foregone
conclusion. How do I get them back to the original page without this
warning, even if I have to "lose" their previous selections?

Use the Redirect After Post pattern. This means that your web form's
submit handler processes the request, but instead of rendering the
resulting page, it redirects the client back to another (or the same)
page, which then renders the result. The browser only stores the GET
request for the "result page", and thus no warning is generated when
the user hits "Back".

Cheers,
 

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

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top