ASP.NET頁面註銷

 首先,頁面的Page_Load事件要有:Context.Response.Cache.SetCacheability(HttpCacheability.NoCache);

然後,“註銷”按鈕要清空Session

        Session.Clear();
        Session.RemoveAll();
        Session.Abandon();
        Server.Transfer("~/Login.aspx");

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章