HttpCookie cookies = Request.Cookies[SessionKeys.CookieName]; if (cookies != null) { cookies.Expires = DateTime.Today.AddDays(-1); Response.Cookies.Add(cookies); Request.Cookies.Remove(SessionKeys.CookieName); }
https://www.cnblogs.com/shy1766IT/p/3731937.html 用户登录之asp.net cookie的写入、读取与操作