p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

proasp_codeclinic thread: AW: Re: creating cookies


Message #1 by "Michael Drozdzowicz" <bandit@g...> on Wed, 2 May 2001 09:01:29 +0200
yes its like a session cookie then.

try this:

test1=request.cookies("test")("1")
test2=request.cookies("test")("2")

response.cookies("test")("1")=test1
response.cookies("test")("2")=test2

and this to set expiration time:


   For Each cookie in Response.Cookies
    Response.Cookies(cookie).Expires = now()+365
   Next

cu
Michael

-----Ursprüngliche Nachricht-----
Von: Ken Schaefer [mailto:ken@a...]
Gesendet: Mittwoch, 2. Mai 2001 03:46
An: Code Clinic
Betreff: [proasp_codeclinic] Re: creating cookies


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: I am suppose to be able to create a cookie by using this line
:
: <% Response.Cookies("cookie") = "test string" %>
:
: It doesn't bomb out but I can't see a file name called cookie
: in my c:\windows\cookies directory.
:
: I want to write a cookie on to the users harddrive but don't
: know how to do it.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If you do not set an expiration time, it becomes a non-persistant, in memory
cookie, which will be destroyed when the user closes their browser.

Cheers
Ken


  Return to Index