ASP.NET Session 清除
// 值为 null,这样对应的 Session 会继续存在,但值为 null
Session["UserId"] = null;
// 移除指定 Session
Session.Remove("UserId");
// 移除所有 Session
Session.Abandon();
[支持/订阅](https://afdian.com/a/taadis)作者,以获得更多服务.
// 值为 null,这样对应的 Session 会继续存在,但值为 null
Session["UserId"] = null;
// 移除指定 Session
Session.Remove("UserId");
// 移除所有 Session
Session.Abandon();
扫码关注我