设置了domain的cookie的删除

设置:
        Response.Cookies[name].Path = "/";
        Response.Cookies[name].Domain = "your.cn";
        Response.Cookies[name].HttpOnly = true;
        Response.Cookies[name].Value = value;
删除:
        Response.Cookies[name].Domain = "your.cn";
        Response.Cookies[name].Expires = DateTime.Now.AddDays(-1);
说明:
在删除前要设置一下Domain

你可能感兴趣的:(综合)