I've got a form that when a button is clicked it sends the data to a database and returns a record number. how can i stop the user form using the back button and hitting enter again?
Printable View
I've got a form that when a button is clicked it sends the data to a database and returns a record number. how can i stop the user form using the back button and hitting enter again?
You can force the cache to expires .In the page load event add this code
Code:Page.Response.Cache.SetCacheability(HttpCacheability.NoCache)
Response.Cache.SetExpires(DateTime.Now)
Hello,
Although there are "hacky" ways to take over the back button in the browser, this can be done using JavaScript, I would highly recommend that you don't do this. This makes for an inconsistent experience for the user, and it not advisable.
Gary