p2p.wrox.com Forums

Need to download code?

View our list of code downloads.

  Return to Index  

proasp_howto thread: Cookie Use

Message #1 by Darren Wogan <darrenw@s...> on Fri, 30 Mar 2001 11:15:07 +0100
You have to be careful with this...

Response.Cookies("cookie name")("cookie key") = value

If you create a cookie with JUST a name, then that's all you can use as, a
single named cookie.
If you try to then create a cookie with the same NAME, but add a KEY to it,
you'll kill the original.
You can't remove a cookie KEY (by setting expiry), only a whole cookie (by
name only).


-----Original Message-----
From: Dallas Martin [mailto:dmartin@z...]
Sent: Friday, March 30, 2001 8:47 AM
To: How To
Subject: Re: Cookie Use

response.cookies("anyname") = anyvalue

response.cookies("anynames")("thisname") = thisvalue

anyvalue = request.cookies("anyname")
thisvalue = request.cookies("anynames")("thisvalue")

----- Original Message -----
From: "Darren Wogan" <darrenw@s...>
To: "How To" <proasp_howto@p...>
Sent: Friday, March 30, 2001 5:15 AM
Subject: Cookie Use

> > I am going to be modifying some code involving cookies. I have not dealt
> > much with these so far and would therefore like to answer some queries
> > before I embark on this:
> >
> > 1) Does anyone know how to assign a name to a cookie? I would prefer to
> > not use the default name assigned to me, if that is possible; is it?
> >
> > 2) Is it possible to have more than one cookie associated with a web
> >
> > 3) If I update one entry in my cookie in one page does it leave all
> > entries alone? I am assuming it will not blank those other entries.
> > Therefore if I create a basic cookie in one place and then add some
> > additional entries in another, the original data will still be present
> > within the cookie. Am I correct to assume this?
> >
> > Regards,
> > Darren Wogan
> >

  Return to Index