Session.Clear() and Session.Abandon()
- Session.Abandon() method used to destroys the session by generating a Session_End event
- Session.Abandon() method used to destroy the current session.
- It is same things to dispose of an object.
- It trigger Session_End event .
- Session.Abandon() method clear occupied memory location.
- Session.Clear() used to just clears all values of session without destroying it.
- It is same things to assigning null value to a variable.
- It doesn’t trigger Session_End in .
- Session.Clear() method just clear session values.
Related ASP.Net Topics :
If you liked this asp.net post, then please subscribe to our YouTube Channel for more asp.net video tutorials.
We hope that this asp.net c# tutorial helped you to understand about Session Clear() and Session Abandon().
Next asp.net tutorial we will understand about Application State in C#.