标签: c# asp.net asp.net-mvc httpcookie
如果您将Cookie的到期时间设置为DateTime.Now.AddDays(-1),它什么时候会过期?它表明到期日是昨天。这是代码:
var rememberMeCookie = new HttpCookie("remember_me"); rememberMeCookie.Expires = DateTime.Now.AddDays(-1);