寫入
HttpCookie cookie = new HttpCookie("adminid");
cookie.Value = adminname.ToString();
HttpContext.Current.Response.Cookies.Add(cookie);
讀取:
HttpContext.Current.Request.Cookies["adminid"].Value
清空cookie 清空單個
Response.Cookies["adminid"].Expires = DateTime.Now.AddDays(-1);