为什么会话变量的值在所有破坏代码之后仍然存在?

login.aspx的
if (IsPostBack == false)
    {
        //destroy any login information
        Session["password"] = "false";
        Session["login"] = "false";
        Session.Abandon();
        Session.RemoveAll();
    }

    if (TextBox2.Text == main_password)
        {//then he is website server admin

            Session["password"] = "password";
            Session["login"] = "true";
            Response.Redirect("~/TABLE.aspx");

        }
table.aspx
    //checking if website server admin
    if ("password" == (string)Session["password"])
    {
        link_logout.Enabled = true;

    }//if ends
    else
    {//not authorized
        Response.Redirect("~/Identify.aspx");
    }//else ends
当我单击注销链接时 登录页面被加载,导致所有会话状态的破坏。 登录页面确认当我使用
response.write
查看会话变量的值时。 当我提供用户名和密码并单击登录时,它会重定向到表页面。 当我点击退出时,它会重定向到登录页面,登录页面会破坏信息。 问题 登录信息销毁后,我点击表链接进入表页,如NO NO所示,重定向到登录页面。 但如果我复制粘贴表页面的网址,那么无论我做什么,它都允许我查看页面。也就是说,即使值被销毁,它也会将会话变量和evalutes的值设置为TRUE。 我不能使用asp.net登录功能,我的限制不允许我使用该控件。     
已邀请:
您在浏览器中看到了该页面的缓存版本。 如果按Ctrl + F5,它应该消失。     
使link_logout成为一个链接按钮,将一个onclick放到页面上,然后在onclick中删除会话变量。然后执行服务器响应重定向。     

要回复问题请先登录注册