Groups | Blog | Home
all groups > inetserver asp general > october 2004 >

inetserver asp general : Delete key\value pairs from a cookie


roxana.turcu NO[at]SPAM scop.ro
10/28/2004 6:35:31 AM
If I have a cookie with 'key/value' pairs, how would I delete a
specific 'key/value' pair while preserving the remaining pairs? I
tried to do something like:
cookie(key)=""
but it didn't seem to work. I do not want to expire the cookie, just
to delete the specified key. I'm working in javascript.
Warp
10/28/2004 10:47:16 AM
Manohar thank you for your reply.

Anyway, the problem was that I was replacing the old cookie with it's value
minus the pair I wanted to delete. This method generates two cookies with the
same name and different paths...a little bit strange. I found that putting
the path in the new cookie solves the problem.

Warp

[quoted text, click to view]
Manohar Kamath
10/28/2004 12:17:24 PM
Try something like

Response.Cookies("MyCookie")("MyKey") = '';

I am guessing you are working on Javascript on the server side, am I
correct?

--
Manohar Kamath
Editor, .netWire
www.dotnetwire.com


[quoted text, click to view]

Paxton
10/31/2004 9:20:38 PM
Try a javascript group.

[quoted text, click to view]

AddThis Social Bookmark Button