How to Kill A Session or Session ID (ASP.NET/C#)

前端 未结 9 1305
礼貌的吻别
礼貌的吻别 2020-11-30 04:09

How can I destroy a session (Session[\"Name\"]) when the user clicks the logout button?

I\'m looking through the ASP.NET API Reference on MSDN and it doesn\'t seem t

9条回答
  •  隐瞒了意图╮
    2020-11-30 04:37

    Session.Abandon()

    This marks the session as Abandoned, but the session won't actually be Abandoned at that moment, the request has to complete first.

提交回复
热议问题