Monday, March 26, 2012

Web Controls and the Back button

A web control event is executed on the server and the form is posted back to
the browser, thus automatically adding the previous state of the page
(before the web control event is fired) to the browser's history. Is there
any way to prevent this ?Are you trying to prevent you page from being cached by the browser?
For example, if the user hit the "Back" button after a postback, you
want the browser to return a "Page has been expired" message?

Tommy,

"Jeremy" <jeremy.bradshaw@.blueyonder.co.yk> wrote in message news:<uRGoFvZtDHA.2136@.TK2MSFTNGP10.phx.gbl>...
> A web control event is executed on the server and the form is posted back to
> the browser, thus automatically adding the previous state of the page
> (before the web control event is fired) to the browser's history. Is there
> any way to prevent this ?
I'm trying to prevent a page update being cached, so if a user hits a link
on page A and enters my webform page B, hits a few buttons (each of which
posts back), and then hits Back, he is taken back to the page A.

"Tommy" <Websoftwares@.Hotmail.com> wrote in message
news:a85edaaf.0311281543.5fdf26b0@.posting.google.c om...
> Are you trying to prevent you page from being cached by the browser?
> For example, if the user hit the "Back" button after a postback, you
> want the browser to return a "Page has been expired" message?
> Tommy,
> "Jeremy" <jeremy.bradshaw@.blueyonder.co.yk> wrote in message
news:<uRGoFvZtDHA.2136@.TK2MSFTNGP10.phx.gbl>...
> > A web control event is executed on the server and the form is posted
back to
> > the browser, thus automatically adding the previous state of the page
> > (before the web control event is fired) to the browser's history. Is
there
> > any way to prevent this ?
The answer, as I found out much later, is to turn on Smart Navigation in
form B

"Jeremy" <jeremy.bradshaw@.blueyonder.co.yk> wrote in message
news:ubAbCUAuDHA.2352@.TK2MSFTNGP09.phx.gbl...
> I'm trying to prevent a page update being cached, so if a user hits a link
> on page A and enters my webform page B, hits a few buttons (each of which
> posts back), and then hits Back, he is taken back to the page A.
> "Tommy" <Websoftwares@.Hotmail.com> wrote in message
> news:a85edaaf.0311281543.5fdf26b0@.posting.google.c om...
> > Are you trying to prevent you page from being cached by the browser?
> > For example, if the user hit the "Back" button after a postback, you
> > want the browser to return a "Page has been expired" message?
> > Tommy,
> > "Jeremy" <jeremy.bradshaw@.blueyonder.co.yk> wrote in message
> news:<uRGoFvZtDHA.2136@.TK2MSFTNGP10.phx.gbl>...
> > > A web control event is executed on the server and the form is posted
> back to
> > > the browser, thus automatically adding the previous state of the page
> > > (before the web control event is fired) to the browser's history. Is
> there
> > > any way to prevent this ?

0 comments:

Post a Comment