hi all.
I searched for this question but don't grasp total answer.
Some answers are:
- "Session.Abandon() destroys the session
- "Session.Clear() just removes all values
i don't understand this. What is the difference between destroying a session and removing its values (please with a example show me this).
A friend told me this:
Clearing the session will not unset the session, it still exists with the same ID for the user but with the values simply cleared.
Abandon will destroy the session completely, meaning that you need to begin a new session before you can store any more values in the session for that user.
this code works and dont throw any exception:
Session.Abandon();
Session["tempKey1"] = "tempValue1";
When you Abandon() a Session, you (or rather the user) will get a new SessionId
when i Test Session Id Dont makes any change when i Abandone session
i just find one difference: session.Abandon() raises Session_End event