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)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 881
1 OriginalGriff 270
2 Volynsky Alex 205
3 CPallini 180
4 Richard Deeming 175
0 OriginalGriff 5,640
1 Sergey Alexandrovich Kryukov 4,693
2 CPallini 4,540
3 George Jonsson 3,132
4 Gihan Liyanage 2,445


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

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100