Copy link to clipboard
Copied
I have 4 pages in my application:
Page1.asp (form page using the POST Method)
Page2.asp (Insert to Database script + Redirect to Page3.asp)
Page3.asp (Page displaying the the confirmation of insertion)
The problem I'm facing is that once on Page3.asp (confirmation page), if the user hits the Back Button, it brings him back to Page1.asp with the form already filled with data previously entered. Eventually, the data can be inserted twice.
Is there a way to redirect the user to say Page4.asp when clicking the back button from Page3.asp?
Copy link to clipboard
Copied
Declare a session variable on page 2 and add a conditional if/else region on page 1 where if session is set then show alternative content else display form.
You can have the entire application on one page using the method mentioned where if post or session variable isset then display confirmation message else display form.
Copy link to clipboard
Copied
I tried that but when the user clicks the Bak Button from the Browser, it doesn't see the Session Variable right away, unless the page refreshes. Is there a way to refresh that page when the user clicks the Back Button?
Copy link to clipboard
Copied
Sorry I can't help because a simplified version of your code example did not display correctly in your post!!!
Copy link to clipboard
Copied
The most common method is to not let the browser cache the page - so that a new page must be pulled from the server. Here's some tips:
http://www.4guysfromrolla.com/webtech/111500-1.shtml
Copy link to clipboard
Copied
clear all inputs everytime the page is loaded,