How to destroy user session

Discussion in 'ASP' started by shyam_oec, Apr 5, 2010.

  1. shyam_oec

    shyam_oec New Member

    Joined:
    Nov 26, 2007
    Messages:
    89
    Likes Received:
    1
    Trophy Points:
    0
    Occupation:
    Software Developer, .NET Framework
    Location:
    Jamshedpur
    Hi,
    for just testing purpose i have created two .aspx page. In page1 a TextBox and a Button,if user inputs "1234" in TextBox then page wil be redirected to Page2.
    In page2 a Button Logout. In Button's click event i have writen

    Code:
      Session.Remove("uid")
      Session.Abandon()
      Response.Redirect("SessionTest1.aspx")
    
    
    where "uid" is Session variable.

    Through this user aging goes to Page1.That's fine, but when browser's back button is pressed it goes to previous page, showing user profile. Page is loaded from cache.Actually this should not happen , and in reality this does not happen. So ,how to properly manage state information and restrict the browser to load page which is stored in cache?
    Thanks.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice