首页 > 其他 > 详细

存取cookies

时间:2017-08-16 11:07:27      阅读:238      评论:0      收藏:0      [点我收藏+]
保存:
Response.Cookies["OpenID"].Value = wxobj.openid;
Response.Cookies["NickName"].Value = HttpUtility.UrlEncode(wxobj.nickname);
Response.Cookies["headimgurl"].Value = headimgurl;
 
取出 if (HttpContext.Current.Request.Cookies["NickName"] != null)
{
AcceptName = HttpUtility.UrlDecode(HttpContext.Current.Request.Cookies["NickName"].Value.ToString());
// AcceptName = HttpContext.Current.Request.Cookies["NickName"].Value.ToString();
}
if (HttpContext.Current.Request.Cookies["OpenID"] != null)
{
userName = HttpContext.Current.Request.Cookies["OpenID"].Value.ToString();
}
 
HttpContext.Current.Response.Cookies["u"]["p"] = phone;
string LoginName = HttpContext.Current.Request.Cookies["u"]["p"].ToString(); ;

存取cookies

原文:http://www.cnblogs.com/zwyAndDong/p/7371980.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!