Response.Cookies["曲奇名称"].Value = "";
读Cookie的语法:
if (Request.Cookies["曲奇名称"] != null)
{
string cookieValue = Request.Cookies["曲奇名称"].Value.ToString();
}
如果你是在类别中写的话,需要写完整的名称,
写Cookie语法:
System.Web.HttpContext.Current.Response.Cookies["曲奇名称"].Value = "";
读Cookie语法:
if (System.Web.HttpContext.Current.Request.Cookies["曲奇名称"] != null)
{
string cookieValue = HttpContext.Current.Request.Cookies["曲奇名称"].Value.ToString();
}