Click here to Skip to main content
15,884,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to override the back button in a web page which should go back to the previous page in my web application?
Posted

try this java script too...

JavaScript
<script type="text/javascript">
    window.history.forward();
    function noBack() { window.history.forward(); }
</script>

<body onload="noBack();">
    onpageshow="if (event.persisted) noBack();" onunload=""></body>
 
Share this answer
 
Comments
Amalachris 6-Dec-12 9:41am    
thanks... it works... :)
try the following code:

C#
Response.Cache.SetCacheability(HttpCacheability.NoCache);
  Response.Cache.SetExpires(Now.AddSeconds(-1));
  Response.Cache.SetNoStore();
  Response.AppendHeader("Pragma", "no-cache");
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900