4
Answers

problem with browser back button when logout

Ask a question
shahid

shahid

16y
7.1k
1
hi
in my project when i click on logout anchor it goes to logout page and my code in logout page is
 if (Session["user_id"] != null)
        {
            Session["user_id"] = null;
            Session.Abandon();
            Response.Clear();
            FormsAuthentication.SignOut();
            Response.Redirect("login.aspx");
        }

it properly logout and goes to login.aspx but  problem is login.aspx when i click browser back button it goes me again on last page where i click on logout anchor.
please any body know solution of this please reply me

Answers (4)