View Full Version : Session.abandon vs session.contents.removeall
01-26-2005, 10:57 PM
As my title suggests whats the difference between Session.abandon and session.contents.removeall
And does session.abandon do what session.contents.removeall would do?
And do i have to like use them in a particular order... because i am guessing that i would have to use say the session abandon method last because after that the session.sessionID variable would be reset or something?
Holler? :thumbsup: :p
01-27-2005, 09:47 AM
im not 100% sure on this but i think Session.Abandon deletes the sessions for that user and Session.Contents.RemoveAll just sets them all to ""
i think the difference is explained on www.w3chools.com somewhere :)
01-27-2005, 10:07 AM
There are two Session collections
When you use
Session.Contents.Removeall It only clears the Contents collection but all static objects remain in use and the session still stays active. Also the Codepage, LCID and SessionID remains in use.
When you use
Session.Abandon You're removing everything about the session. Then and only then will the Session_OnEnd event be triggered.
Hope this helped
01-27-2005, 09:06 PM
i think i've obtained a full understading
session.contents.remove or removeall removes a particular or All session variables resepctively.... keepin the id
However session.abandon simply destroys all variables and resets the session with a new id
and to use both of them would to b redundant in a sense :D :p :thumbsup:
thanks guys! :)
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.