faqts : Computers : Programming : Languages : Visual basic

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

8 of 17 people (47%) answered Yes
Recently 6 of 10 people (60%) answered Yes

Entry

How do I delete a session cookie?

Mar 22nd, 2004 22:56
Jason Benson, Charlie Brown,


Depending on what you want to do you can:

session.contents.remove("MySession")

OR simply:
Session("MySession") = ""

Please note the 2nd method doesn't actually remove the session, however 
it does set it to nothing, which is fairly common.

If you are asking about Cookies (seperate thing) then you would: 

Response.Cookies("MyCookie") = ("")
Response.Cookies("MyCookie").Expires = Date() - 1000

HTH
jb