Cookie Troubles

Results 1 to 2 of 2

Thread: Cookie Troubles

  1. #1
    Join Date
    Dec 1969

    Default Cookie Troubles

    Hello,<BR>I have a form that has a checkbox to remember me. This form goes to an asp page that then has the code to store cookies<BR>If I have it just store everytime the asp page is accessed than it works great, however if I try to tell it only to run the code when the check box is checked than it does not work. Any thoughts?<BR>Here is my code:<BR>Sub cook_OnClick<BR>Response.Cookies("Name")= Request.Form("username")<BR>Response.Cookies("Name ").Expires="Jan 1, 2010"<BR>End Sub

  2. #2
    Join Date
    Dec 1969

    Default Your Expires is illegal form

    The best thing to do is pass in a DATE value (*not* a string) and let ASP take care of getting the formatting right for you.<BR><BR>Response.Cookies("Name").Expires = #1/1/2010#<BR><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