This is a migrated thread and some comments may be shown as answers.

Get and Set cookie

1 Answer 102 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Agm
Top achievements
Rank 1
Agm asked on 20 Nov 2013, 03:55 PM
Hi,

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.

AGM RAJA

1 Answer, 1 is accepted

Sort by
0
Boyan Dimitrov
Telerik team
answered on 25 Nov 2013, 10:00 AM
Hello AGM,

I would suggest reviewing this help article in order to learn more about the cookies in asp.net. 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.


Regards,
Boyan Dimitrov
Telerik
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.
Tags
General Discussions
Asked by
Agm
Top achievements
Rank 1
Answers by
Boyan Dimitrov
Telerik team
Share this question
or