H
Hugo Flores
Hi all,
I noticed that there are three methods that can remove session
variables
Session.Clear()
Session.RemoveAll()
Session.Abandon()
Now my question as is stated on the subject, what is the best way to
end a session?
I know that the name itself is telling me that Sessin.Abandon() should
be the methond called when ending a session, but if the other two
methods clear or remove all the variables, isn't that the same, since
if I want to go to a page that requires a session variable it just
won't have it?
Actually I found using either RemoveAll or Clear, better than Abandon,
since the Remarks on the Abandon method on MSDN already state that you
can still access session variables after calling the method.
Could anybody explain the difference among these methods?
I noticed that there are three methods that can remove session
variables
Session.Clear()
Session.RemoveAll()
Session.Abandon()
Now my question as is stated on the subject, what is the best way to
end a session?
I know that the name itself is telling me that Sessin.Abandon() should
be the methond called when ending a session, but if the other two
methods clear or remove all the variables, isn't that the same, since
if I want to go to a page that requires a session variable it just
won't have it?
Actually I found using either RemoveAll or Clear, better than Abandon,
since the Remarks on the Abandon method on MSDN already state that you
can still access session variables after calling the method.
Could anybody explain the difference among these methods?