Page Expired/Back Button

  • Thread starter Thread starter James
  • Start date Start date
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?
 
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,
 
Back
Top