after the submit

  • Thread starter Thread starter Grant
  • Start date Start date
G

Grant

After clicking on the submit button, it will take the user to a thank you
page with their receipts. I notice that if you click on the back button in
browser, it will take you back to the previous page and you can resubmit
that page again. What is the best way for me to stop that?



Thanks
 
detect the resubmit on the server. i real life, the user may submit serveral
times if the site or internet is slow. they never know if one of them
worked. you site should allow this to happen. use a transaction key stored
in a hidden field then log if the transaction has been completed.

-- bruce (sqlwork.com)
 
Someone reply directly to my e-mail so I am posting it here because it
worked.



I put the line below on page load event and I put it on the pages that I
don't want the back button to be able to go back to. For example the code
below was put in page load event in the payment method page and when the
user clicked on the submit button, the thank you page comes up next. If the
user clicked on back button in the thank you page, it will go back to what
page it was prior to the payment method page, which in my case is the home
page. The code below basically prevents the page loading into the user
cache.

Response.Cache.SetCacheability(HttpCacheability.NoCache)
 
Back
Top