Click here to Skip to main content
12,952,778 members (35,326 online)
Rate this:
Please Sign up or sign in to vote.
See more:
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
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.
Rate this: bad
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";

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

Solution 2

you can do it by the session when you log out make session cleare
Rate this: bad
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">

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

    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 6,389
CHill60 3,490
Maciej Los 3,103
Jochen Arndt 1,975
ppolymorphe 1,920

Advertise | Privacy | Mobile
Web02 | 2.8.170525.1 | Last Updated 27 Feb 2013
Copyright © CodeProject, 1999-2017
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