The cookie is crumbling...

Discussion in 'ASP General' started by Tim Johnson, Jul 10, 2003.

  1. Tim Johnson

    Tim Johnson Guest

    Hi,

    I am starting to use cookies in my ASP pages, this is
    new for me, I am using the following code to create a
    cookie:

    Response.Cookies("bookedby")= Request.Form("txtBookedBy")
    Response.Cookies("bookedby").expires="#July 29, 2003#"

    However, when the page is opened I get the following
    error:

    Error Type:
    Microsoft VBScript runtime (0x800A000D)
    Type mismatch: 'Response.Cookies(...).Expires'
    /MRBS/addbookingtodb.asp, line 5

    Line 5 is when I try to set the expiry. Please help :)

    TIA.
     
    Tim Johnson, Jul 10, 2003
    #1
    1. Advertising

  2. Tim Johnson

    Ray at Guest

    Take the date out of quotes so you just have:

    Response.Cookies("bookedby").Expires=#July 29, 2003#

    Ray at home

    "Tim Johnson" <> wrote in message
    news:a1b101c34697$b0f41ca0$...
    > Hi,
    >
    > I am starting to use cookies in my ASP pages, this is
    > new for me, I am using the following code to create a
    > cookie:
    >
    > Response.Cookies("bookedby")= Request.Form("txtBookedBy")
    > Response.Cookies("bookedby").expires="#July 29, 2003#"
    >
    > However, when the page is opened I get the following
    > error:
    >
    > Error Type:
    > Microsoft VBScript runtime (0x800A000D)
    > Type mismatch: 'Response.Cookies(...).Expires'
    > /MRBS/addbookingtodb.asp, line 5
    >
    > Line 5 is when I try to set the expiry. Please help :)
    >
    > TIA.
     
    Ray at, Jul 10, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ben
    Replies:
    3
    Views:
    5,931
    Steven Cheng[MSFT]
    Jun 3, 2004
  2. Shapper

    Cookie and Session Cookie Questions.

    Shapper, Apr 27, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    606
  3. =?Utf-8?B?UGF1bA==?=

    Cookie Question (IP as domain and cookie file location)

    =?Utf-8?B?UGF1bA==?=, Jan 10, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    2,534
    Bruce Barker
    Jan 10, 2006
  4. ad
    Replies:
    2
    Views:
    7,665
    Kevin Spencer
    Jan 27, 2006
  5. =?Utf-8?B?TnVubw==?=

    Convert a PHP cookie to an ASP.NET cookie

    =?Utf-8?B?TnVubw==?=, Jan 31, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    463
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Jan 31, 2006
Loading...

Share This Page