clear cookies

    /// <summary>
    /// clear cookies
    /// </summary>
    /// <param name="Cookie"></param>
    public void RemoveCookies(string Cookie)
    {
        HttpCookie cook = Request.Cookies[Cookie];
        cook.Expires = DateTime.Now.AddDays(-1);
        cook.Values.Clear();
        System.Web.HttpContext.Current.Response.Cookies.Set(cook);
    }
posted @ 2012-11-29 01:07  技术笔记2012  阅读(231)  评论(0编辑  收藏  举报