//创建Cookie
HttpCookie cookie = new HttpCookie("username");
cookie.Value = "TEST";
or HttpCookie cookie = new HttpCookie("username","TEST");
cookie.Expires = DateTime.MaxValue;
Response.Cookies.Add(cookie);
//读取Cookie
Request.Cookies["username"].ToString();
浙公网安备 33010602011771号