complex data structure in httpcookie

Discussion in 'ASP .Net' started by Waqqas Farooq, Jun 30, 2004.

  1. Can I add more than 1 values in a cookie?
    e.g if i create a httpcookie then the syntax would be like this:

    Dim myCookie as new HttpCookie("myCookieName")
    myCookie.Value = "myval1"
    Response.Add(myCookie)


    Now if i want to add more than 1 values in the cookie then how can I do
    that?
    Waqqas Farooq, Jun 30, 2004
    #1
    1. Advertising

  2. Waqqas Farooq

    avnrao Guest

    myCookie["firstKey"] = "myval1";
    myCookie["secondKey"] = "myval2";
    myCookie.Values.Add("thirdKey", "myval3");

    hth,
    Av.

    "Waqqas Farooq" <> wrote in message
    news:...
    > Can I add more than 1 values in a cookie?
    > e.g if i create a httpcookie then the syntax would be like this:
    >
    > Dim myCookie as new HttpCookie("myCookieName")
    > myCookie.Value = "myval1"
    > Response.Add(myCookie)
    >
    >
    > Now if i want to add more than 1 values in the cookie then how can I do
    > that?
    >
    >
    >
    >
    avnrao, Jun 30, 2004
    #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. Ivan Demkovitch

    Cookie vs HttpCookie

    Ivan Demkovitch, Dec 8, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    4,991
    bruce barker
    Dec 8, 2003
  2. Chris
    Replies:
    0
    Views:
    679
    Chris
    Dec 9, 2003
  3. Gawel
    Replies:
    1
    Views:
    5,544
    Scott Allen
    Feb 21, 2005
  4. Replies:
    1
    Views:
    390
    intrader
    Jul 6, 2005
  5. Ram
    Replies:
    3
    Views:
    415
    Barry Schwarz
    Mar 24, 2009
Loading...

Share This Page