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 Richard MacCutchan 269
1 Aajmot Sk 252
2 Marcin Kozub 235
3 Sergey Alexandrovich Kryukov 185
4 Praneet Nadkar 167
0 OriginalGriff 7,913
1 Sergey Alexandrovich Kryukov 7,232
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,865


Advertise | Privacy | Mobile
Web03 | 2.8.1411023.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