loout function

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Proogeren
    New Member
    • May 2007
    • 36

    loout function

    I have a master page that contains a logout button. If you click this a session value is set (using https so sessions are ok). My problem is that if I press the logout button I redirect the user to another location. All good. but if I click the back button in the browser I can see the previous page. Page_Load is not triggered in my masterpage so I can not see if the session value allows the user to see the page or not..

    What can be done to prevent this??? Without using the login controls that exist in C#?
  • kenobewan
    Recognized Expert Specialist
    • Dec 2006
    • 4871

    #2
    If the page caching then this is what you look at. HTH.

    Comment

    • Proogeren
      New Member
      • May 2007
      • 36

      #3
      Originally posted by kenobewan
      If the page caching then this is what you look at. HTH.
      nope does not have caching..
      hmm

      Comment

      • Proogeren
        New Member
        • May 2007
        • 36

        #4
        Originally posted by Proogeren
        nope does not have caching..
        hmm
        solved with

        Code:
        
                    Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1));
                    Response.Cache.SetCacheability(HttpCacheability.NoCache);
                    Response.Cache.SetNoStore();
        in my master page's Page_Load event :)
        works in both FF and IE

        Comment

        • kenobewan
          Recognized Expert Specialist
          • Dec 2006
          • 4871

          #5
          Well done thanks for sharing the solution ;).

          Comment

          Working...