public void loaddata() { Maticsoft.BLL.weixin wx_bll = new BLL.weixin(); string open_id = ""; if (Session["open_id"] == null) { string code = Request.QueryString["code"]; if (code != null && code != "") { open_id = wx_bll.get_openid(code); if (open_id != null && open_id != "") { Session["open_id"] = open_id; loadinfo(open_id); } else { Response.Write(@"<script>alert('无法获取您的微信信息,返回首页');window.location='m_weixin\index.aspx'</script>"); } } else { Response.Write(@"<script>alert('无法获取您的微信信息,返回首页');window.location='m_weixin\index.aspx'</script>"); } } else { open_id = Session["open_id"].ToString(); loadinfo(open_id); } }