Urgent help needed in cookie arrays

Discussion in 'ASP .Net' started by Raghu Raman, Mar 30, 2005.

  1. Raghu Raman

    Raghu Raman Guest

    Hi,

    In javascript file i store 3 values under a single cookie array ,like

    var myarray = new Array(null);
    myarray["a1"] = "field_1";
    myarray["a2"] = "field_2";
    myarray["a3"] = "field_3";
    document.cookie ="myarray=" + myarray;

    it is successfully executed.But i can not retrieve the stored cookie
    values in my c#.net code.

    ***
    Could u pls tell me the way i stored the cookie array in javascript is
    right?if not pls tell me how.

    ***If so pls tell me how can i retrieve the stroed values in my c#.net
    code.


    Thanks & Regards
    Raghu




    *** Sent via Developersdex http://www.developersdex.com ***
     
    Raghu Raman, Mar 30, 2005
    #1
    1. Advertising

  2. Request.Cookies.Get("myarray").Value will give you a comma separated value of
    the array values. use the strings split function to get the array back
    BTW for this to work u shud use myarray[0] , myarray[1] ... instead on a1,a2

    "Raghu Raman" wrote:

    > Hi,
    >
    > In javascript file i store 3 values under a single cookie array ,like
    >
    > var myarray = new Array(null);
    > myarray["a1"] = "field_1";
    > myarray["a2"] = "field_2";
    > myarray["a3"] = "field_3";
    > document.cookie ="myarray=" + myarray;
    >
    > it is successfully executed.But i can not retrieve the stored cookie
    > values in my c#.net code.
    >
    > ***
    > Could u pls tell me the way i stored the cookie array in javascript is
    > right?if not pls tell me how.
    >
    > ***If so pls tell me how can i retrieve the stroed values in my c#.net
    > code.
    >
    >
    > Thanks & Regards
    > Raghu
    >
    >
    >
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    >
     
    =?Utf-8?B?c2FyYXRoeQ==?=, Mar 30, 2005
    #2
    1. Advertising

  3. Raghu Raman

    Raghu Raman Guest

    Raghu Raman, Mar 31, 2005
    #3
    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,936
    Steven Cheng[MSFT]
    Jun 3, 2004
  2. Poornima

    problem on arrays plz help its urgent

    Poornima, Jan 8, 2007, in forum: C Programming
    Replies:
    4
    Views:
    253
    Sourcerer
    Jan 8, 2007
  3. Philipp
    Replies:
    21
    Views:
    1,190
    Philipp
    Jan 20, 2009
  4. Ann and John

    Cookie Qustion - help needed

    Ann and John, Mar 3, 2004, in forum: Javascript
    Replies:
    1
    Views:
    80
  5. Replies:
    7
    Views:
    176
    Dr J R Stockton
    Aug 8, 2007
Loading...

Share This Page