Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
下面是我的代码:
UserName = "Hello :" + Session["Username"].ToString()+ " | Logout ";
我想要的是,当有人点击LogOut时,会话应该被放弃。
我怎样才能达到所需的结果。
会话.Abandon(); 将完成这项工作。
使用它来删除价值并放弃它。
Session.RemoveAll();
Session.Clear(); Session.Abandon();