Cookies
I provide a general code to explain how to set and get a cookie in ASP.Net
protected void btnSubmit_Click(object sender, EventArgs e)
{
HttpCookie testCookie = new HttpCookie("TestCookie");
testCookie.Path = "/";
testCookie.Expires = Convert.ToDateTime("March 14 2000");
testCookie.Value = "Nikhil Agarwal";
Response.SetCookie(testCookie);
HttpCookie testCookieValue = new HttpCookie("TestCookie");
if (testCookieValue != null)
{
Response.Write(testCookieValue.Value.ToString());
}
}
Reference: http://mycodediary.blogspot.com/2009/01/what-is-cookies.html