Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET
we make a custom login control userid password saved in custom database. when user login then reach to home page after logout, login page provide ; but when we use browser back button then again it provide home page.how to stop it because we want that after using browser back button it send user to login page.
Posted 15-Apr-12 21:45pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

  Permalink  
Comments
P.Salini at 16-Apr-12 6:15am
   
5!
sravani.v at 16-Apr-12 7:52am
   
thank you salini :)
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

Hi friends,
 
Please find the below code...
this may help you.......
 

<script type="text/javascript">
    window.history.forward();
    function noBack() { window.history.forward(); }
</script>
<body  önload="noBack();">
    onpageshow="if (event.persisted) noBack();" onunload=""></body>
 
If this is not satisfied then click below link......
http://viralpatel.net/blogs/2009/11/disable-back-button-browser-javascript.html[^]
  Permalink  
v4
Comments
vasudevaragul at 26-May-13 1:19am
   
Not working my friend... In all the websites they have given this code only... But its not working for me
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

Hi ,
Try to Google First
Search[^]
Best Regards
M.Mitwalli
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 195
1 ProgramFOX 130
2 Maciej Los 105
3 Afzaal Ahmad Zeeshan 82
4 Sergey Alexandrovich Kryukov 75
0 OriginalGriff 6,564
1 Sergey Alexandrovich Kryukov 6,048
2 DamithSL 5,228
3 Manas Bhardwaj 4,717
4 Maciej Los 4,150


Advertise | Privacy | Mobile
Web02 | 2.8.1411022.1 | Last Updated 16 Apr 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