ASP.NET Session 清除

// 值为 null,这样对应的 Session 会继续存在,但值为 null
Session["UserId"] = null;

// 移除指定 Session
Session.Remove("UserId");

// 移除所有 Session
Session.Abandon();
posted @ 2017-09-13 10:22  taadis  阅读(204)  评论(0编辑  收藏  举报