-5

I am working on online exam page if the user click on start exam button there are three process have to done

  1. disable button
  2. click on back button in browser it will going to redirect to login page

In the section, I have completed 1. But how to achieve point 2? Does this require C#, JavaScript, jQuery or ASP.NET?

Could this work? Response.Redirect() or Server.Redirect()

Abbas
  • 14,186
  • 6
  • 41
  • 72
  • No caps in questions please: shouting won't get you there. Also: code isn't shouting either, so keep it lower case too! – Abbas Mar 19 '14 at 08:57

1 Answers1

2

You can prevent back button from working using this code....

<script type = "text/javascript" >
        function preventBack() { window.history.forward(); }
        setTimeout("preventBack()", 0);
        window.onunload = function () { null };
  </script>
Jameem
  • 1,840
  • 3
  • 15
  • 26