I have very large website which uses a lot of cookies. There are approx. 14 different cookies are there. I have different cookies for each item. When a user surfs the site they will have 14 cookies in their browser. I do not want this.
I want a single cookie for my site that will have 14 items and I can add,edit and delete them. I tried many ways but I am not able to do this.
Can any body help me plllzzz...It's vry urgnt
Chiranjita NayakPosted Oct 29, 2014, 3:32 AM
HttpCookie cookie = new HttpCookie("Maincookie");
cookie.Values.Add("id", "1");
cookie.Values.Add("Name", "name");
//get the values
string id= Request.Cookies["Maincookie"]["id"];
string Name= Request.Cookies["Maincookie"]["Name"];