Cookie的读写

记住怎么写就可以了,不要问我为什么=_=

1 设置值的页面:context.Response.SetCookie(new HttpCookie("username",username) {Expires=DateTime.Now.AddDays(7) }); //保存7天
2 读取值的页面:username= Request.Cookies["UserName"].Value;
原文地址:https://www.cnblogs.com/ZX-LMY/p/5831228.html