Friday 14 December 2012

Disable browser back button after authentication in asp.net application

To disable back button After login 
Place this code in the HTML head section of  Login.aspx  page

    <script type="text/javascript" language="javascript">
        function preventBack() { window.history.forward(); }
        setTimeout("preventBack()", 0);
        window.onunload = function () { null };

  </script>

No comments:

Post a Comment

Total Pageviews