Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How to delete a cookie?

Reply
Thread Tools

How to delete a cookie?

 
 
Boban Dragojlovic
Guest
Posts: n/a
 
      07-02-2003

I need the statement for deleting a permanent cookie that I created
earlier...

The .NET documentation refers to the .discard property, but the compiler
balks at that property

e.g. Response.Cookies("deleteME").discard()




 
Reply With Quote
 
 
 
 
Steve C. Orr, MCSD
Guest
Posts: n/a
 
      07-02-2003
There's a Remove method for the cookies collection that might work for you:

http://msdn.microsoft.com/library/de...emovetopic.asp

MyCookieCollection.Remove(MyCookie)

Another way to remove a cookie is to set the Expire property to a date in
the past.

--
I hope this helps,
Steve C. Orr, MCSD
http://Steve.Orr.net


"Boban Dragojlovic" <news@_N_O_S_P_AM_dragojlovic.org> wrote in message
news:b6JMa.344$(E-Mail Removed) .com...
>
> I need the statement for deleting a permanent cookie that I created
> earlier...
>
> The .NET documentation refers to the .discard property, but the compiler
> balks at that property
>
> e.g. Response.Cookies("deleteME").discard()
>
>
>
>



 
Reply With Quote
 
 
 
 
David Waz..
Guest
Posts: n/a
 
      07-03-2003
I've never trusted the .remove method.
I always expire the cookie so I know the client will have
the expired data. I should take the time to research the
total affect of .Remove, but setting the date to now - 1
day works so well...
>-----Original Message-----
>There's a Remove method for the cookies collection that

might work for you:
>
>http://msdn.microsoft.com/library/default.asp?

url=/library/en-
us/cpref/html/frlrfsystemwebhttpcookiecollectionclassremove
topic.asp
>
>MyCookieCollection.Remove(MyCookie)
>
>Another way to remove a cookie is to set the Expire

property to a date in
>the past.
>
>--
>I hope this helps,
>Steve C. Orr, MCSD
>http://Steve.Orr.net
>
>
>"Boban Dragojlovic" <news@_N_O_S_P_AM_dragojlovic.org>

wrote in message
>news:b6JMa.344$(E-Mail Removed) y.com...
>>
>> I need the statement for deleting a permanent cookie

that I created
>> earlier...
>>
>> The .NET documentation refers to the .discard property,

but the compiler
>> balks at that property
>>
>> e.g. Response.Cookies("deleteME").discard()
>>
>>
>>
>>

>
>
>.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
To delete or not to delete? Lethal Computer Support 15 07-24-2005 11:47 PM
Can someone tell me why I can't delete this file? and why it blue screens WinXP Pro on delete? zZz Computer Support 1 01-12-2005 02:37 AM
Cannot Delete, (The Delete Key Won't Work) Lee Something Computer Support 13 10-15-2003 09:51 PM
Overloading new[] and delete[]: how do they vary from new and delete? HeroOfSpielburg C++ 1 08-06-2003 03:58 AM
delete on delete ! Sandeep Grover C++ 19 07-22-2003 10:09 AM



Advertisments