Click here to Skip to main content
11,707,470 members (69,581 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET
I am new to this and I'm creating web page in asp.NET with c#. In that page, after user logs out, they are still able to use the BACK button and are able to read-only the information. I cannot figure out how to get rid of this Back button issue. I want my wenpage to exhibit the same behavior that Yahoo! Mail exibits: after you sign out, you are not able to go back (even by using the Back button in the browser), without signing back in. Any help would be REALLY appreciated!!! Thanks!
Posted 27-Feb-13 0:16am
Comments
Sergey Alexandrovich Kryukov at 20-Mar-13 9:36am
   
Please stop posting non-answers as "solution". It can give you abuse reports which eventually may lead to cancellation of your CodeProject membership.
Comment on any posts, reply to available comments, or use "Improve question" (above).
Also, keep in mind that members only get notifications on the post sent in reply to there posts.
—SA
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

Try This :

Add this on your Home page on which loh out is thre.

Response.Buffer = true;
Response.ExpiresAbsolute = DateTime.Now.AddDays(-1d);
Response.Expires = -1500;
Response.CacheControl = "no-cache";
Response.Cache.SetNoStore();


this may help you, if not then please post it.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

you can do it by the session when you log out make session cleare
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 5

pass parameter values 1 and -1 i don't exectly remember what value was this will block back functionality
second point on logout must use Session.Abondon(); or Session["UserProfile"] == null and check on your pages if Session["UserProfile"] == null; Response.Redirect("~/Login.aspx");

<script language="javascript" type="text/javascript">
    window.history.forward(1);
</script>
  Permalink  

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

  Print Answers RSS
0 Maciej Los 195
1 Mika Wendelius 190
2 OriginalGriff 156
3 Sergey Alexandrovich Kryukov 145
4 chainerlt 110
0 OriginalGriff 9,178
1 Sergey Alexandrovich Kryukov 8,562
2 CPallini 5,189
3 Maciej Los 4,806
4 Mika Wendelius 3,706


Advertise | Privacy | Mobile
Web04 | 2.8.150819.1 | Last Updated 27 Feb 2013
Copyright © CodeProject, 1999-2015
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