C# 清除Cookies

   HttpCookie aCookie = HttpContext.Current.Request.Cookies[cookieName];
            if (aCookie != null)
            {
                aCookie.Expires = DateTime.Now.AddDays(-300);
                aCookie.Value = null;
                HttpContext.Current.Response.Cookies.Add(aCookie);
             
            }

posted @ 2018-05-14 18:29  —阿峰—  阅读(234)  评论(0编辑  收藏  举报