写入Cookie
读取Cookie
Response.Cookies["UserName"].Value = "用户名";
Response.Cookies["CustomerID"].Expires = DateTime.Today.AddDays(30);
读取Cookie
if (Request.Cookies["UserName"].Value != null)
{
//用户曾登录
string username = Request.Cookies["UserName"].Value;
}
else
{
//新用户须进入登录界面
}