Click here to Skip to main content
15,886,689 members
Articles / Web Development / ASP.NET

How to prevent Re-Post action caused by pressing browser's Refresh button

Rate me:
Please Sign up or sign in to vote.
2.00/5 (2 votes)
7 Feb 2012CPOL 10.4K   1  
Could you not achieve the same thing with javascript?if (document.all){ document.onkeydown = function () { var key_f5 = 116; if (key_f5==event.keyCode){ event.keyCode=0; alert ("Sorry! You can not refresh this page!"); ...

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
United Kingdom United Kingdom
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions