asp.net 使用cookie保存用户信息和读取
3 回答
浮云间
TA贡献1829条经验 获得超4个赞
写出CookieResponse.Cookies["userName"].Value = "test";
Response.Cookies["userName"].Expires = DateTime.Now.AddMonths(1);读取验证CookieString userName = String.Empty;
if(Request.Cookies["userName"]!=null)
userName = Request.Cookies["userName"].Value;
添加回答
举报
0/150
提交
取消