Cookies in ASP - NEED HELP!!

Results 1 to 2 of 2

Thread: Cookies in ASP - NEED HELP!!

  1. #1
    Join Date
    Dec 1969

    Default Cookies in ASP - NEED HELP!!

    I need to check if there is a cookie named CustomerID on a client computer, and if not, send them to a page with a form that ask their first name, last name and email address. Then this is set to the cookie CustomerID. ANy suggestions, examples I can check out. The example on the 4guys website does not explain the attributes, and what and how many ASP pages is involved.<BR><BR>Please help<BR>Johann

  2. #2
    Tony H Guest

    Default RE: Cookies in ASP - NEED HELP!!

    You can check for a cookie with the request collection:<BR>&#060;% request.cookies("CustomerID")%&#062;<BR>You could test for true/false and use the response.redirect to send them to your other page.<BR><BR>To create a cookie use the response collection:<BR>&#060;% response.cookies("CustomerID")%&#062; Then use attributes like<BR>response.cookies("CustomerID") = "whatever" &#039Value of cookie<BR>response.cookies("CustomerID").Expires ="August 1, 2000" &#039expires<BR>response.cookies("CustomerID").sec ure &#039encrypt it<BR>response.cookies("CustomerID").Path="/examples" &#039will send when requested page path begins with "examples"<BR><BR>Hope this helps!<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts