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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

kill one session variable 2

Status
Not open for further replies.

mwa

Programmer
Jul 12, 2002
507
US
Hi all...

Just a quick question, if I want to kill just one session variable (not using session.abandon), would it be safe to use:

session("myvariable") = nothing

Or is there a better way to do this?

mwa

 
Yes, there IS a better way to do this.

the command is:

Session.Contents.Remove("VarName")

Simply remember though, that if your server is an NT server you are running ASP 2.0

the above command is only supported in ASP 3.0 (win 2000+)
 
Session.Contents.Remove("myvariable")
or
Session.Contents.Remove(0) => you can also reference the index value, assuming 0 is the index of myvariable. ________________________________________________________________________
Are you trying to debug your ASP applications? See faq333-3255 for more details

regards,
Brian
 
OK Cool... We do use ASP 3.0

Thanks for your help...

mwa
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top