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);
             
            }

猜你喜欢

转载自www.cnblogs.com/it1042290135/p/9037535.html