zoukankan      html  css  js  c++  java
  • 存取cookies

    保存:
    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(); ;
  • 相关阅读:
    11月20日
    11月19日
    11月26日
    11月25日
    生活有感(一)
    c# word 删除指定内容
    mysql insert语句
    c# 删除word文档中某一页
    mysql 相同表结构拷贝数据
    调试再次出错
  • 原文地址:https://www.cnblogs.com/zwyAndDong/p/7371980.html
Copyright © 2011-2022 走看看