This entry is part of a series, ASP.NET Sessions»
If you want to terminate your session and effectively wipe out all variables in it, call Session.Abandon(). Â Although you can reset your session variables back to Nothing, this will also notify ASP.NET to clear the session up and call the event handler in Global.asax to deal with the session end (I think that this is the only way that this ever actually gets fired, but I could be wrong).
Entries in this series:
- ASP.NET Sessions Part 1
- ASP.NET Sessions Part 2 - accessing session state variable data
- ASP.NET Sessions Part 3 - Maintaining the Session Data Across Multiple Requests
- ASP.NET Sessions Part 4 - Configuring how the Session Variable Data is Stored on the Server
- ASP.NET Sessions Part 5 - How Long Does a Session Last?
- ASP.NET Sessions Part 6 - Abandoning a Session
No related posts.
Tags: .NET, Abandon, ASP.NET, ASP.NET Sessions, Session, Sessions, SessionState, State