Session.Clear stays in the same session.
Session.Abandon dumps the current session and starts a new session.
Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
> What is the difference between Session.Abandon and Session.Clear?
> Thank you.
Session.Abandon() will end current session
Session_End will be fired and next request will fire Session_Start
Session.Clear will just clear the session data , the session is still alive
Session ID will remain same in both cases, as long as the browser is not
closed.
> What is the difference between Session.Abandon and Session.Clear?
> Thank you.
JJ_377@hotmail.com - 29 Oct 2005 22:03 GMT
Thank you - my further question,s what is recommended in terms of
clearing any session variables in the context of:
1. on error, I want any session variables cleared and the user
redirected to a logon page
( I wish to prevent a user from reentering the error page and
recreating the original error)
3. I wish to prevent others from "backing" into web pages if a user
does not log out and session timeout has not yet occurred.
I have the web pages set so that the browser will not cache them
It kind of sounds like I just need Session.clear, but I have been using
Session.Abandon.
MY thanks!