asp.net - Storing multiple values in cookies -
I have a very large website that uses a lot of cookies almost 14 different cookies I have every item There are 14 different cookies for when a user engages the site, 14 cookies in their browser. I do not want this.
I need a cookie for my site, which will have 14 items and I can add, edit and delete them. I tried many ways but I am not able to do this.
I have to put some run-time cookies, save the user name in the cookie as well. After logging in user I want to save my personal site address in it. Eventually, I want both the username and the individual site address. I want to save the user before and after the name of the user, when the user goes to his personal site, then I will save time to run the name of the private site.
Is there any idea how can I do this?
Matthew defeated me, but yes, see ...
A single cookie with multiple keys / values for typing and reading, this will look like this:
http cookie cookie = new HTTP cookie ("MyBugCooki"); Cookie value. Add ("name", name); Cookie value. Add ("Address", Address); // value out string name = get request Cookies ["mybigcookie"] ["name"]; String Address = Request Cookies ["mybig cookie"] ["address"];
Comments
Post a Comment