To create a cookie,
HttpCookie CookieName = new HttpCookie("Users"); To set values for the cookie,
CookieName.Values.Add("Questions", "DotNetFunda");
CookieName.Values.Add("Products", "ITFunda"); Suppose you want to add the cookie to the cookie collection, then
Response.Cookies.Add(CookieName);
To get the value stored in the cookie
Response.Write(CookieName.Value.ToString());
Suppose you want to retrive the specific cookie, then
Response.Write(CookieName["Products"].ToString());