What is the difference between Session.Abandon() and Session.Clear()?
Answer»
Session.Clear():
Clears all the session values but doesn't destroy the Session.
Removes only the values (content) from the Object.
The session with the same key is still alive.
Use Session.Clear(): if you don’t want to kill the session but just wants to clear the session-specific data and reinitialize the session.
It will not raise the Session_OnEnd event.
Abondon():
Destroys the whole session object & RELEASE all the resources
If you do not call the Abandon method explicitly, the SERVER destroys the objects when the session TIMES out.
It has no return value and no parameters
Abandon raises the Session_OnEnd event request.
If a request is made that includes the session identifier for an expired or abandoned session, a new session is started USING the same session identifier