创建Cookie:
HttpCookie myCookie = new HttpCookie("Cookie1", "deng"); Response.Cookies.Add(myCookie);
接收Cookie:
txtCookieValues.Text = Request.Cookies["Cookie1"].Value;
编辑Cookie:
Request.Cookies["Cookie1"].Value = Request.Cookies["Cookie1"].Value+txtCookieValues.Text; Response.Cookies.Add(Request.Cookies["Cookie1"]);
删除Cookie:
Request.Cookies["Cookie1"].Expires = DateTime.Now.AddSeconds(-1); Response.Cookies.Add(Request.Cookies["Cookie1"]);