Page_Load on browser Back button

I

Ian Semmel

Is there a way to get the Page_Load event to fire if the user clicks the
Back button on the browser rather than clicking a hyperlink ?
 
L

Leon Mayne

Ian Semmel said:
Is there a way to get the Page_Load event to fire if the user clicks the
Back button on the browser rather than clicking a hyperlink ?

I don't think so, because it's down to the browser to post back to trigger
the event, and most browsers just pull back a cached copy. If there was a
postback previously on the page then in IE the user gets the "Page has
expired" messagebox which prompts them to repost the form data, but they
might not, and reposting the data may mess your app up.

You could try telling the browser not to cache the page, but I don't think
this would work. You're better off telling the user not to click back in
their browser, and providing a very clear "Back" button or hyperlink.
 
B

bruce barker

disabling caching causes the repost dialog box. you are better off designing
your site to allow use of the back button and caching. you users will be
happer. you shoudl also handle repost of the same page (refresh).

-- bruce (sqlwork.com)
 

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,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top