AVOID multiple form submittals via "back button"
I know there really isn't a way to disable the "back button" on the browser BUT ... I'm trying to not allow multiple entries via a form submit when the back button is depressed on the browser.
Basically is there a code snippet that somebody can provide so that when a form is submitted and somebody attempts to go back by hitting the "back" button, that form information just entered won't resubmit into the database?
Any assistance you provide is greatly appreciated!!!
Thanks Much,
Des
Try with Session Cookies...
Try saving a session cookie on the INSERT asp page:
Code:
If Session("already_inserted") = "" then
SQL = "..."
Session("already_inserted") = "Y"
Response.Redirect "..."
Else
Response.Write "You already submitted the form"
End If
So, If the session cookie has already been created, it won't let the user pass the information again to the database, at least for several minutes. If you want something more permanent, use cookies with the ".Expires" value and not Session cookies. Regards!