Get and Set cookie

2 posts, 0 answers
  1. Agm
    Agm avatar
    26 posts
    Member since:
    Sep 2012

    Posted 20 Nov 2013 Link to this post


    I want to use cookie to store my application value.

    Here is a snippet :

    // Settings is an object array.
    object[] Settings = new object[3];

    // This is Cookie
    HttpCookie aCookie = new HttpCookie("aSettings");

    I am using the cookies for the first time.

    I want to store the Settings in cookie,
    and get back from the cookie to Object[] Settings.

    please help me.

    Thanks in advance.

  2. Boyan Dimitrov
    Boyan Dimitrov avatar
    2033 posts

    Posted 25 Nov 2013 Link to this post

    Hello AGM,

    I would suggest reviewing this help article in order to learn more about the cookies in As far as I understand you want to keep more than one value in the cookie object. So I would suggest taking a look at the section  Cookies with More Than One Value. I believe that setting the expiration time and controlling the cookie scope would be also helpful.

    Boyan Dimitrov
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top