Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
How to override the back button in a web page which should go back to the previous page in my web application?
Posted 6-Dec-12 3:32am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

try this java script too...
 
<script type="text/javascript">
    window.history.forward();
    function noBack() { window.history.forward(); }
</script>
 
<body onload="noBack();">
    onpageshow="if (event.persisted) noBack();" onunload=""></body>
  Permalink  
Comments
Amalachris at 6-Dec-12 9:41am
   
thanks... it works... :)
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

try the following code:
 
Response.Cache.SetCacheability(HttpCacheability.NoCache);
  Response.Cache.SetExpires(Now.AddSeconds(-1));
  Response.Cache.SetNoStore();
  Response.AppendHeader("Pragma", "no-cache");
  Permalink  

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



Advertise | Privacy | Mobile
Web04 | 2.8.140709.1 | Last Updated 6 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid