July 12th, 2003, 06:55 AM
How do you destroy cookies?
Probably not a very challenging question, but how the @#$% do you destroy a cookie?
response.cookie("Cookie") = nothing
and a host of others!
Any help will be appreciated.
July 16th, 2003, 01:56 PM
You have to expire them. You can also create session cookies. These cookies will destroy themselves when the session ends. In classic ASP, there is a "expires" property.
Hope this helps,
August 24th, 2003, 06:34 AM
I've been having the same problem, and I almost went mad! Here's what finally worked for me:
Use Response.AppendCookie() to add a cookie with the same name as the cookie that you want to remove, and an expiration date that is in the past. For example (in C#):
HttpCookie objCookie= new HttpCookie("CookieName");
objCookie.Expires = DateTime.Today.AddYears(-1);
I was trying this same thing with the Response.Cookies.Add() method, and it seems like it used to work, but it doesn't now, so I've switched over to this way.
Hope this helps!