// Add this on the beginning of your .cs code file using System;
// Use this line when you want to save a cookie Response.Cookies["CookieName"].Value ="CookieValue"; // How long will cookie exist on client hard disk Response.Cookies["CookieName"].Expires = DateTime.Now.AddDays(2);
// To add multiple key/value pairs in single cookie Response.Cookies["EmployeeData"]["FirstName"] = "Mark"; Response.Cookies["EmployeeData"]["LastVisit"] = DateTime.Now.ToString();
Join MindStick Community
You need to log in or register to vote on answers or questions.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
Click Here
cheers
http://mindstick.com/Articles/c4e253f5-67dc-4211-8a1f-e29c17ce2943/
// Add this on the beginning of your .cs code file
using System;
// Use this line when you want to save a cookie
Response.Cookies["CookieName"].Value ="CookieValue";
// How long will cookie exist on client hard disk
Response.Cookies["CookieName"].Expires = DateTime.Now.AddDays(2);
// To add multiple key/value pairs in single cookie
Response.Cookies["EmployeeData"]["FirstName"] = "Mark";
Response.Cookies["EmployeeData"]["LastVisit"] = DateTime.Now.ToString();