当前位置:编程学习 > C#/ASP.NET >>

Cookie 删除不了啊,Help?

添加cookie
  
  HttpCookie cookie = new HttpCookie("user_name", Server.UrlEncode(txt_username.Text.Trim()));
                            cookie.Expires = DateTime.Now.AddDays(5);
                            cookie.Domain = "wl.com.cn";
                            cookie.Secure = false;
                            Response.AppendCookie(cookie);
                            HttpCookie cookieid = new HttpCookie("psid", Server.UrlEncode(ds.Tables[0].Rows[0]["UserID"].ToString().Trim()));
                            cookieid.Expires = DateTime.Now.AddDays(5);
                            cookieid.Domain = "wl.com.cn";
                            cookieid.Secure = false;
                            Response.AppendCookie(cookieid);
删除
            HttpCookie cookie = Request.Cookies["user_name"];
            cookie.Expires = DateTime.Now.AddDays(-10);
            cookie.Domain = "wl.com.cn";
            cookie.Secure = true;
            Response.AppendCookie(cookie);
            cookie = Request.Cookies["psid"];
            cookie.Expires = DateTime.Now.AddDays(-10);
            cookie.Domain = "wl.com.cn";
            cookie.Secure = true;
            Response.AppendCookie(cookie);
怎么删除不了啊??求解?? Cookie  --------------------编程问答-------------------- cover me --------------------编程问答-------------------- 代码没有问题
补充:.NET技术 ,  C#
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,