Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

session.clear() effects? 1

Status
Not open for further replies.

jetar

Programmer
Oct 16, 2003
49
0
0
US
I am using some session variables on a page that I want to clear using session.clear() if the user decides to reset the form as I am pulling those session variables to run queries when the form posts back to iteself.

My question is: Will session.clear() only clear the session variables associated with that specific session_id (or user) and not clear ALL session variables. I just wanted to be sure that when a user selects to reset the form and I run session.clear() that it only clears their session values and not ALL session values.

Thanks!
 
jet - to do this I always use

Session.RemoveAll

..and though I have never used Session.Clear the two may be equivalent. I would argue that only the unique Session ID is affected, at least in the latter that is the case.
 
Thanks Isadore. I think I may switch over and use session.removeall() because it seems to relate more to what I am doing. After messing with my page a bit though I think that session.clear() has the same effect, but there must be some functional distinction between the two. Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top