{"id":29181,"date":"2024-11-25T12:42:31","date_gmt":"2024-11-25T04:42:31","guid":{"rendered":"https:\/\/fwq.ai\/blog\/29181\/"},"modified":"2024-11-25T12:42:31","modified_gmt":"2024-11-25T04:42:31","slug":"asp-net%e5%be%ae%e4%bf%a1%e5%bc%80%e5%8f%91%e5%b7%b2%e5%85%b3%e6%b3%a8%e7%94%a8%e6%88%b7%e7%ae%a1%e7%90%86%e6%ad%a5%e9%aa%a4%e8%af%a6%e8%a7%a3","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/29181\/","title":{"rendered":"asp.net\u5fae\u4fe1\u5f00\u53d1\u5df2\u5173\u6ce8\u7528\u6237\u7ba1\u7406\u6b65\u9aa4\u8be6\u89e3"},"content":{"rendered":"<p>\u8fd9\u7bc7\u6587\u7ae0\u4e3b\u8981\u4ecb\u7ecd\u4e86asp.net\u5fae\u4fe1\u5f00\u53d1\u4e2d\u6709\u5173\u5df2\u5173\u6ce8\u7684\u76f8\u5173\u5185\u5bb9\uff0c\u9700\u8981\u7684\u670b\u53cb\u53ef\u4ee5\u53c2\u8003\u4e0b<\/p>\n<p>\u516c\u4f17\u53f7\u53ef\u901a\u8fc7\u672c\u6765\u83b7\u53d6\u5e10\u53f7\u7684\u5173\u6ce8\u8005\u5217\u8868\uff0c\u5173\u6ce8\u8005\u5217\u8868\u7531\u4e00\u4e32OpenID\uff08\u52a0\u5bc6\u540e\u7684\u5fae\u4fe1\u53f7\uff0c\u6bcf\u4e2a\u7528\u6237\u5bf9\u6bcf\u4e2a\u516c\u4f17\u53f7\u7684OpenID\u662f\u552f\u4e00\u7684\uff09\u7ec4\u6210\u3002\u4e00\u6b21\u62c9\u53d6\u8c03\u7528\u6700\u591a\u62c9\u53d610000\u4e2a\u5173\u6ce8\u8005\u7684OpenID\uff0c\u53ef\u4ee5\u901a\u8fc7\u591a\u6b21\u62c9\u53d6\u7684\u65b9\u5f0f\u6765\u6ee1\u8db3\u9700\u6c42\u3002<\/p>\n<p>\u63a5\u53e3\u8c03\u7528\u8bf7\u6c42\u8bf4\u660e<\/p>\n<p>http\u8bf7\u6c42\u65b9\u5f0f: GET\uff08\u8bf7\u4f7f\u7528https\u534f\u8bae\uff09<\/p>\n<p style=\"text-align: center\"><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/013\/2a5de7a43726084121f8b7e2119fc613-0.jpg\" style=\"max-width:90%\" class=\"aligncenter\" title=\"asp.net\u5fae\u4fe1\u5f00\u53d1\u5df2\u5173\u6ce8\u7528\u6237\u7ba1\u7406\u6b65\u9aa4\u8be6\u89e3\u63d2\u56fe\" alt=\"asp.net\u5fae\u4fe1\u5f00\u53d1\u5df2\u5173\u6ce8\u7528\u6237\u7ba1\u7406\u6b65\u9aa4\u8be6\u89e3\u63d2\u56fe\" \/><\/p>\n<p>\u8fd4\u56de\u8bf4\u660e<\/p>\n<p>\u6b63\u786e\u65f6\u8fd4\u56de\u6570\u636e\u5305\uff1a<\/p>\n<p style=\"text-align: center\"><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/013\/53016047f64bb7bf613ef87144ba63eb-1.jpg\" style=\"max-width:90%\" class=\"aligncenter\" title=\"asp.net\u5fae\u4fe1\u5f00\u53d1\u5df2\u5173\u6ce8\u7528\u6237\u7ba1\u7406\u6b65\u9aa4\u8be6\u89e3\u63d2\u56fe1\" alt=\"asp.net\u5fae\u4fe1\u5f00\u53d1\u5df2\u5173\u6ce8\u7528\u6237\u7ba1\u7406\u6b65\u9aa4\u8be6\u89e3\u63d2\u56fe1\" \/><\/p>\n<p>\u9519\u8bef\u65f6\u8fd4\u56deJSON\u6570\u636e\u5305\uff08\u793a\u4f8b\u4e3a\u65e0\u6548AppID\u9519\u8bef\uff09\uff1a<\/p>\n<p>{&#8220;errcode&#8221;:40013,&#8221;errmsg&#8221;:&#8221;invalid appid&#8221;}<br \/>\u9644\uff1a\u5173\u6ce8\u8005\u6570\u91cf\u8d85\u8fc710000\u65f6<\/p>\n<p>\u5f53\u516c\u4f17\u53f7\u5173\u6ce8\u8005\u6570\u91cf\u8d85\u8fc710000\u65f6\uff0c\u53ef\u901a\u8fc7\u586b\u5199_openid\u7684\u503c\uff0c\u4ece\u800c\u591a\u6b21\u62c9\u53d6\u5217\u8868\u7684\u65b9\u5f0f\u6765\u6ee1\u8db3\u9700\u6c42\u3002<\/p>\n<p>\u5177\u4f53\u800c\u8a00\uff0c\u5c31\u662f\u5728\u8c03\u7528\u63a5\u53e3\u65f6\uff0c\u5c06\u4e0a\u4e00\u6b21\u8c03\u7528\u5f97\u5230\u7684\u8fd4\u56de\u4e2d\u7684next_openid\u503c\uff0c\u4f5c\u4e3a\u4e0b\u4e00\u6b21\u8c03\u7528\u4e2d\u7684next_openid\u503c\u3002<\/p>\n<p>\u793a\u4f8b\u5982\u4e0b\uff1a<\/p>\n<p>\u516c\u4f17\u8d26\u53f7A\u62e5\u670923000\u4e2a\u5173\u6ce8\u7684\u4eba\uff0c\u60f3\u901a\u8fc7\u62c9\u53d6\u5173\u6ce8\u63a5\u53e3\u83b7\u53d6\u6240\u6709\u5173\u6ce8\u7684\u4eba\uff0c\u90a3\u4e48\u5206\u522b\u8bf7\u6c42url\u5982\u4e0b\uff1a<br \/>https:\/\/api.weixin.qq.com\/cgi-bin\/user\/get?access_token=ACCESS_TOKEN <br \/><strong>\u8fd4\u56de\u7ed3\u679c:<\/strong><\/p>\n<pre>{\r\n&nbsp;\"total\":23000,\r\n&nbsp;\"count\":10000,\r\n&nbsp;\"data\":{\"\r\n&nbsp;openid\":[\r\n&nbsp;\"OPENID1\",\r\n&nbsp;\"OPENID2\",\r\n&nbsp;...,\r\n&nbsp;\"OPENID10000\"\r\n&nbsp;]\r\n&nbsp;},\r\n&nbsp;\"next_openid\":\"OPENID10000\"\r\n}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>https:\/\/api.weixin.qq.com\/cgi-bin\/user\/get?access_token=ACCESS_TOKEN&amp;next_openid=NEXT_OPENID1<br \/><strong>\u8fd4\u56de\u7ed3\u679c:<br \/><\/strong><\/p>\n<p><\/p>\n<pre>{\r\n&nbsp;\"total\":23000,\r\n&nbsp;\"count\":10000,\r\n&nbsp;\"data\":{\r\n&nbsp;\"openid\":[\r\n&nbsp;\"OPENID10001\",\r\n&nbsp;\"OPENID10002\",\r\n&nbsp;...,\r\n&nbsp;\"OPENID20000\"\r\n&nbsp;]\r\n&nbsp;},\r\n&nbsp;\"next_openid\":\"OPENID20000\"\r\n}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>https:\/\/api.weixin.qq.com\/cgi-bin\/user\/get?access_token=ACCESS_TOKEN&amp;next_openid=NEXT_OPENID2<br \/>\u8fd4\u56de\u7ed3\u679c\uff08\u5173\u6ce8\u8005\u5217\u8868\u5df2\u8fd4\u56de\u5b8c\u65f6\uff0c\u8fd4\u56denext_openid\u4e3a\u7a7a\uff09:<\/p>\n<p><\/p>\n<pre>{\r\n&nbsp;\"total\":23000,\r\n&nbsp;\"count\":3000,\r\n&nbsp;\"data\":{\"\r\n&nbsp;\"openid\":[\r\n&nbsp;&nbsp;\"OPENID20001\",\r\n&nbsp;&nbsp;\"OPENID20002\",\r\n&nbsp;&nbsp;...,\r\n&nbsp;&nbsp;\"OPENID23000\"\r\n&nbsp;]\r\n&nbsp;},\r\n&nbsp;\"next_openid\":\"OPENID23000\"\r\n}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u5fae\u4fe1\u5b98\u65b9\u7f51\u7ad9\u540e\u53f0\u7684\u63a5\u53e3\u6743\u9650\u8868\u91cc\uff08\u4ee5\u670d\u52a1\u53f7\u4e3a\u4f8b\uff09\u6bcf\u5929\u8c03\u7528\u7684\u80fd\u83b7\u53d6500\u6b21\uff0c\u83b7\u53d6\u7528\u6237\u57fa\u672c\u4fe1\u606f\u53ef\u4ee5\u83b7\u53d6500000\u6b21\uff0c\u6240\u4ee5\u8bf4\u63a5\u4e0b\u6765\uff0c\u6211\u5728\u83b7\u53d6\u7528\u6237\u5217\u8868\u7684\u65f6\u5019\uff0c\u4f1a\u7528\u5230\uff0c\u522b\u770b500\u6b21\u4e0d\u5c11\u4e86\uff0c<br \/>\u53ef\u662f\u771f\u6b63\u7684\u7528\u8d77\u6765\u5feb\u5f97\u4e0d\u5f97\u4e86\uff0c\u5148\u4e0a\u6548\u679c\u56fe\u5982\u4e0b\uff1a<\/p>\n<p style=\"text-align: center\"><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/013\/53016047f64bb7bf613ef87144ba63eb-2.png\" style=\"max-width:90%\" class=\"aligncenter\" title=\"asp.net\u5fae\u4fe1\u5f00\u53d1\u5df2\u5173\u6ce8\u7528\u6237\u7ba1\u7406\u6b65\u9aa4\u8be6\u89e3\u63d2\u56fe2\" alt=\"asp.net\u5fae\u4fe1\u5f00\u53d1\u5df2\u5173\u6ce8\u7528\u6237\u7ba1\u7406\u6b65\u9aa4\u8be6\u89e3\u63d2\u56fe2\" \/><\/p>\n<p>\u5148\u6765\u770b\u770b\u7528\u6237\u5217\u8868\uff0c\u5b98\u7f51\u8bf4\u83b7\u53d6\u7528\u6237\u7684\u5217\u8868\u8fd4\u56de\u7684\u662f\u4e00\u7ec4\u7ec4openID\uff0c\u9488\u5bf9\u8fd9\u4e2a\u7279\u6027\uff0c\u6211\u662f\u8fd9\u4e48\u505a\u7684\uff0c<br \/>\u521b\u5efa\u4e00\u4e2a\u7528\u4e8e\u5b58\u50a8openId\u7684\u7c7b<\/p>\n<pre>public&nbsp;class&nbsp;WxOpenIdInfo\r\n&nbsp;{\r\n&nbsp;public&nbsp;string&nbsp;WxopenId&nbsp;{&nbsp;get;&nbsp;set;&nbsp;}\/\/\u7528\u6237\u5b58\u653e\u5fae\u4fe1\u7528\u6237\u7684openId\r\n&nbsp;}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u7136\u540e\u518d\u521b\u5efa\u7528\u6237\u4fe1\u606f\u7684\u57fa\u672c\u7c7b<\/p>\n<pre>&nbsp;\/\/\/&nbsp;&lt;summary&gt;\r\n&nbsp;\/\/\/&nbsp;\u5fae\u4fe1\u7528\u6237\u57fa\u672c\u4fe1\u606f\u7c7b\r\n&nbsp;\/\/\/&nbsp;&lt;\/summary&gt;\r\n&nbsp;public&nbsp;class&nbsp;WxUserInfo\r\n&nbsp;{\r\n&nbsp;public&nbsp;int&nbsp;subscribe&nbsp;{&nbsp;get;&nbsp;set;&nbsp;}\/\/\u5173\u6ce8\u72b6\u6001\r\n\r\n&nbsp;public&nbsp;string&nbsp;openid&nbsp;{&nbsp;get;&nbsp;set;&nbsp;}\/\/OpenID\r\n\r\n&nbsp;public&nbsp;string&nbsp;nickname&nbsp;{&nbsp;get;&nbsp;set;&nbsp;}\/\/\u6635\u79f0\r\n\r\n&nbsp;public&nbsp;string&nbsp;sex&nbsp;{&nbsp;get;&nbsp;set;&nbsp;}\/\/\u6027\u522b\r\n\r\n&nbsp;public&nbsp;string&nbsp;city&nbsp;{&nbsp;get;&nbsp;set;&nbsp;}\/\/\u57ce\u5e02\r\n\r\n&nbsp;public&nbsp;string&nbsp;province&nbsp;{&nbsp;get;&nbsp;set;&nbsp;}\/\/\u7701\u4efd\r\n\r\n&nbsp;public&nbsp;string&nbsp;headimgurl&nbsp;{&nbsp;get;&nbsp;set;&nbsp;}\/\/\u5934\u50cf\u56fe\u7247\u5730\u5740\r\n\r\n&nbsp;public&nbsp;string&nbsp;subscribe_time&nbsp;{&nbsp;get;&nbsp;set;&nbsp;}\/\/\u5173\u6ce8\u65f6\u95f4\r\n\r\n&nbsp;public&nbsp;string&nbsp;remark&nbsp;{&nbsp;get;&nbsp;set;&nbsp;}\/\/\u5907\u6ce8\r\n\r\n&nbsp;public&nbsp;string&nbsp;groupid&nbsp;{&nbsp;get;&nbsp;set;&nbsp;}\/\/\u5206\u7ec4ID\r\n\r\n&nbsp;}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>&nbsp;\u7528\u6237\u5217\u8868\u524d\u53f0\u4ee3\u7801<\/strong><\/p>\n<pre>\r\n\r\nnbsp;html&amp;gt;\r\n\r\n\r\n\r\n&lt;meta&gt;\r\n&nbsp;&lt;title&gt;&lt;\/title&gt;\r\n&nbsp;&lt;link&gt;\r\n&nbsp;&lt;style&gt;\r\n #title {width:100%; height:40px;margin-top:10px; text-indent:5px; line-height:40px;}\r\n .checkstyle { float:left;}\r\n #DDlAddgroups { text-align:center; width:161px; border:1px solid #d9d9d9; border-radius:5px; height:35px; line-height:35px; font-weight:bold; text-align:center; float:left; margin:auto 5px auto 5px;}\r\n .DDlAddgroups{ text-align:center; width:161px; border:1px solid #d9d9d9; border-radius:5px; height:35px; line-height:35px; font-weight:bold; text-align:center; float:left; margin:auto 5px auto 5px;}\r\n #DDLgroups { text-align:center; width:111px; border:1px solid #d9d9d9; border-radius:5px; height:35px; line-height:35px; font-weight:bold; text-align:center; float:left; margin:auto 5px auto 5px;}\r\n .newGroups { margin:auto 5px auto 5px;}\r\n .inputstyle { height:35px; line-height:35px; text-indent:5px; width:280px;background-image:url(&#039;images\/inputbg.gif&#039;); background-repeat:repeat-x;border-top:solid 1px #a7b5bc; border-left:solid 1px #a7b5bc; border-right:solid 1px #ced9df; border-bottom:solid 1px #ced9df; float:left; margin:auto 5px auto 5px;\r\n }\r\n .wxusertab { border:1px solid #d9d9d9; width:100%; text-align:left; text-indent:5px;\r\n } \r\n \r\n th { height:35px;background-image:url(&#039;images\/th.gif&#039;); background-repeat:repeat-x;\r\n }\r\n td {\r\n  border-bottom:1px solid #d9d9d9;\r\n }\r\n .trcolor { background-color:#ecd9df;\r\n }\r\n tr:hover { cursor:pointer; \r\n }\r\n  #FenPage { width:1124px; height:25px; line-height:25px; text-align:center; margin:20px auto 20px auto;\r\n }\r\n .linka { color:#0094ff; cursor:pointer;\r\n }\r\n .fenyebtn {width:60px; height:25px; border:1px solid #ced9df; border-radius:5px; text-align:center; line-height:25px; float:right;\r\n }\r\n .fenyebtn2 { width:60px; height:25px; border:1px solid #ced9df; border-radius:5px; text-align:center; line-height:25px;margin-left:10px;float:right;\r\n }\r\n .toPageIndex { width:60px;height:25px; background-image:url(&#039;images\/inputbg.gif&#039;); margin-left:10px; background-repeat:repeat-x;border-top:solid 1px #a7b5bc; border-left:solid 1px #a7b5bc; border-right:solid 1px #ced9df; border-bottom:solid 1px #ced9df; text-align:center; float:right;\r\n }\r\n .gotoPagebtn { width:60px; height:25px; border:1px solid #ced9df; border-radius:5px; text-align:center; line-height:25px;margin-left:10px;float:right; background-color:#ced9df;\r\n }\r\n .deletebtn {float:left;width:100px; color:#000; height:25px; background-color:#ced9df; border:1px solid #ced9df; border-radius:5px; text-align:center;\r\n }\r\n a { color:#08a5e0;\r\n }\r\n .droplist { background-image:url(&#039;images\/inputbg.gif&#039;); background-repeat:repeat-x; width:120px; height:25px; border:1px solid #ced9df;\r\n }\r\n .checkstyle { float:left;\r\n }\r\n .imgheadstyle { width:50px; height:50px; margin-top:10px;\r\n }\r\n .lbsubscribeCount { font-size:26px;\r\n }\r\n\r\n #shownewgroup { width:300px; height:200px; background-color:white;z-index:9999; border:2px solid #DDD; top:40%; left:40%; background-color:#fff; position:fixed;margin:-100px auto auto -100px; display:none;\r\n }\r\n #shownewgroupzhezhaoceng { height:200%; width:200%; left:0px; top:0px;position:fixed; z-index:9998; background:rgb(50,50,50);background:rgba(0,0,0,0.5); display:none;\r\n }\r\n .closeLogin { height:30px; border-bottom:2px solid #31bb34; text-align:right; line-height:30px; font-size:14px; font-weight:bold;\r\n }\r\n a:hover { cursor:pointer;\r\n }\r\n\r\n\r\n #updateremark { width:300px; height:200px; background-color:white;z-index:9999; border:2px solid #DDD; top:40%; left:40%; background-color:#fff; position:fixed;margin:-100px auto auto -100px; display:none;\r\n }\r\n #updateremark_zhezhaoceng { height:100%; width:100%; left:0px; top:0px;position:fixed; z-index:9998; background:rgb(50,50,50);background:rgba(0,0,0,0.5); display:none;\r\n }\r\n\r\n &lt;\/style&gt;\r\n\r\n&nbsp;&lt;script&gt;&lt;\/script&gt;\r\n&nbsp;&lt;script&gt;\r\n $(document).ready(function () {\r\n\r\n  $(\".newGroups\").click(function () {\r\n  $(\"#shownewgroupzhezhaoceng\").show();\r\n  $(\"#shownewgroup\").show();\r\n  }),\r\n  $(&#039;.closeloginpage&#039;).click(function () {\r\n  $(\"#shownewgroupzhezhaoceng\").hide();\r\n  $(\"#shownewgroup\").hide();\r\n  })\r\n })\r\n &lt;\/script&gt;\r\n&nbsp;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 &nbsp; <\/p>\n<p> &nbsp;&nbsp;<span>\u4f4d\u7f6e\uff1a<\/span> &nbsp;&nbsp;<\/p>\n<ul>\n  &nbsp;&nbsp;&nbsp; <\/p>\n<li><\/li>\n<p> &nbsp;&nbsp;&nbsp; <\/p>\n<li>\u5fae\u4fe1\u7ba1\u7406<\/li>\n<p> &nbsp;&nbsp;&nbsp; <\/p>\n<li>\u5fb7\u6865\u5458\u5de5\u670d\u52a1\u4e2d\u5fc3&#8211;\u5173\u6ce8\u8005\u5217\u8868\u7ba1\u7406<\/li>\n<p> &nbsp;&nbsp;\n<\/ul>\n<p> &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <\/p>\n<p> &nbsp;&nbsp;&nbsp;<\/p>\n<p>&nbsp;&nbsp;<\/p>\n<p> &nbsp;&nbsp; <\/p>\n<p>&nbsp;&nbsp;30\u5b57\u7b26\u4ee5\u5185<\/p>\n<p> &nbsp;&nbsp; &nbsp;&nbsp; <\/p>\n<p>&nbsp;\u786e\u5b9a\u521b\u5efa<\/p>\n<p> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <\/p>\n<p> &nbsp;&nbsp; <\/p>\n<p><span>\u5df2\u5173\u6ce8\u4eba\u6570<\/span><span>&nbsp;<\/span><\/p>\n<p> &nbsp;&nbsp; <\/p>\n<p> &nbsp;&nbsp; <span>\u5168\u9009&nbsp;<\/span> &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;<\/p>\n<\/p>\n<p> &nbsp;&nbsp;  &nbsp;&nbsp;  &nbsp;&nbsp; <\/p>\n<p>&nbsp;\u67e5\u8be2<\/p>\n<p> &#8211;%&gt; &nbsp; <\/p>\n<p> &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <\/p>\n<table>\n  &nbsp; <\/p>\n<tbody>\n<tr>\n    &nbsp;&nbsp;&nbsp; <\/p>\n<th><\/th>\n<p> &nbsp;&nbsp;&nbsp; <\/p>\n<th>OpenID<\/th>\n<p> &nbsp;&nbsp;&nbsp; <\/p>\n<th>\u5934\u50cf<\/th>\n<p> &nbsp;&nbsp;&nbsp; <\/p>\n<th>\u6635\u79f0\uff08\u5907\u6ce8\u540d\uff09<\/th>\n<p> &nbsp;&nbsp;&nbsp; <\/p>\n<th>\u5173\u6ce8\u65f6\u95f4<\/th>\n<p> &nbsp;&nbsp;&nbsp; <\/p>\n<th>\u6240\u5c5e\u5206\u7ec4<\/th>\n<p> &nbsp;&nbsp;&nbsp; <\/p>\n<th>\u64cd\u4f5c<\/th>\n<p> &nbsp;&nbsp;<br \/>\n  <\/tr>\n<p> &nbsp;&nbsp; &nbsp;&nbsp; <\/p>\n<tr>\n    &nbsp;&nbsp;&nbsp;&nbsp; <\/p>\n<td>&nbsp;&nbsp; &nbsp;<\/td>\n<p> &nbsp;&nbsp;&nbsp;&nbsp; <\/p>\n<td> &nbsp;&nbsp;&nbsp;&nbsp;<\/td>\n<p> &nbsp;&nbsp;&nbsp;&nbsp; <\/p>\n<td> <img>&nbsp;<\/td>\n<p> &nbsp;&nbsp;&nbsp;&nbsp; <\/p>\n<td> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;<\/td>\n<p> &nbsp;&nbsp;&nbsp;&nbsp; <\/p>\n<td> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;<\/td>\n<p> &nbsp;&nbsp;&nbsp;&nbsp; <\/p>\n<td>&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; \u5206\u7ec4\u540d\u79f0 &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;<\/td>\n<p> &nbsp;&nbsp;&nbsp;&nbsp; <\/p>\n<td> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;<\/td>\n<p> &nbsp;&nbsp;&nbsp;<br \/>\n  <\/tr>\n<p> &nbsp;&nbsp; &nbsp; &nbsp;&nbsp;<br \/>\n <\/tbody>\n<\/table>\n<p> &nbsp;&nbsp; <\/p>\n<p> &nbsp;&nbsp; \u786e\u5b9a &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <span>&gt;&gt;|<\/span> &nbsp; &nbsp;&nbsp; <span>&gt;<\/span> &nbsp; &nbsp;&nbsp;&nbsp; <span><\/span> &nbsp; &nbsp;&nbsp; <span>|<\/span> &nbsp; &nbsp;&nbsp;<span>\u5f53\u524d\u7b2c<\/span> &nbsp;&nbsp;<span><\/span> &nbsp;&nbsp;<span>\u9875\/<\/span> &nbsp;&nbsp;<span>\u5171<\/span> &nbsp;&nbsp;<span><\/span> &nbsp;&nbsp;<span>\u9875<\/span> &nbsp;&nbsp;<span><\/span> &nbsp;&nbsp;<span>\u5171\u641c\u7d22\u5230&nbsp;<\/span> &nbsp;&nbsp;<span><\/span> &nbsp;&nbsp;<span>\u6761\u8bb0\u5f55.<\/span> &nbsp;&nbsp;<\/p>\n<p> &nbsp;&nbsp; &nbsp; &nbsp; <\/p>\n<p>\u83b7\u53d6\u7528\u6237\u5217\u8868\u7ed1\u5b9a\u7528\u6237\u4fe1\u606f\u7684\u540e\u53f0\u4ee3\u7801\uff0c\u5df2\u5305\u62ec\uff0c\u4fee\u6539\u5907\u6ce8\u540d\uff0c\u5c06\u7528\u6237\u79fb\u52a8\u5230\u5206\u7ec4\uff0c\u65b0\u5efa\u5206\u7ec4\u4ee3\u7801<\/p>\n<p style=\"text-align: center\"><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/013\/6467129b49cee3ebb9bed9ad5a6c0d95-3.png\" style=\"max-width:90%\" class=\"aligncenter\" title=\"asp.net\u5fae\u4fe1\u5f00\u53d1\u5df2\u5173\u6ce8\u7528\u6237\u7ba1\u7406\u6b65\u9aa4\u8be6\u89e3\u63d2\u56fe3\" alt=\"asp.net\u5fae\u4fe1\u5f00\u53d1\u5df2\u5173\u6ce8\u7528\u6237\u7ba1\u7406\u6b65\u9aa4\u8be6\u89e3\u63d2\u56fe3\" \/><\/p>\n<p>\u5206\u7ec4\u7edf\u8ba1\uff0c\u7528\u4e8e\u663e\u793a\u6bcf\u4e2a\u5206\u7ec4\u7684\u5df2\u5b58\u5728\u4eba\u6570\uff0c\u65e0\u5176\u4ed6\u4f5c\u7528<\/p>\n<p><strong>\u4e0a\u4ee3\u7801\uff1a<\/strong><\/p>\n<pre>&nbsp;PagedDataSource&nbsp;pds&nbsp;=&nbsp;new&nbsp;PagedDataSource();\r\n&nbsp;protected&nbsp;void&nbsp;Page_Load(object&nbsp;sender,&nbsp;EventArgs&nbsp;e)\r\n&nbsp;{\r\n&nbsp;&nbsp;if(!Page.IsPostBack)\r\n&nbsp;&nbsp;{\r\n&nbsp;&nbsp;BindGroupList();\r\n&nbsp;&nbsp;BindGetAllUserOpenIdList();\r\n&nbsp;&nbsp;this.DataBind();\r\n&nbsp;&nbsp;this.CheckAll.AutoPostBack&nbsp;=&nbsp;true;\r\n&nbsp;&nbsp;this.DDlAddgroups.AutoPostBack&nbsp;=&nbsp;true;\r\n&nbsp;&nbsp;}\r\n&nbsp;&nbsp;\/\/this.DDlAddgroups.Enabled&nbsp;=&nbsp;false;\r\n&nbsp;&nbsp;\r\n&nbsp;}\r\n&nbsp;\/\/\/&nbsp;&lt;summary&gt;\r\n&nbsp;\/\/\/&nbsp;\u83b7\u53d6\u6240\u6709\u7528\u6237\u7684openId\u5217\u8868\r\n&nbsp;\/\/\/&nbsp;&lt;\/summary&gt;\r\n&nbsp;private&nbsp;void&nbsp;BindGetAllUserOpenIdList()\r\n&nbsp;{\r\n&nbsp;&nbsp;WeiXinServer&nbsp;wxs&nbsp;=&nbsp;new&nbsp;WeiXinServer();\r\n\r\n&nbsp;&nbsp;\/\/\/\u4ece\u7f13\u5b58\u8bfb\u53d6accesstoken\r\n&nbsp;&nbsp;string&nbsp;Access_token&nbsp;=&nbsp;Cache[\"Access_token\"]&nbsp;as&nbsp;string;\r\n\r\n&nbsp;&nbsp;if&nbsp;(Access_token&nbsp;==&nbsp;null)\r\n&nbsp;&nbsp;{\r\n&nbsp;&nbsp;\/\/\u5982\u679c\u4e3a\u7a7a\uff0c\u91cd\u65b0\u83b7\u53d6\r\n&nbsp;&nbsp;Access_token&nbsp;=&nbsp;wxs.GetAccessToken();\r\n\r\n&nbsp;&nbsp;\/\/\u8bbe\u7f6e\u7f13\u5b58\u7684\u6570\u636e7000\u79d2\u540e\u8fc7\u671f\r\n&nbsp;&nbsp;Cache.Insert(\"Access_token\",&nbsp;Access_token,&nbsp;null,&nbsp;DateTime.Now.AddSeconds(7000),&nbsp;System.Web.Caching.Cache.NoSlidingExpiration);\r\n&nbsp;&nbsp;}\r\n\r\n&nbsp;&nbsp;string&nbsp;Access_tokento&nbsp;=&nbsp;Access_token.Substring(17,&nbsp;Access_token.Length&nbsp;-&nbsp;37);\r\n\r\n&nbsp;&nbsp;string&nbsp;jsonres&nbsp;=&nbsp;\"\";\r\n\r\n&nbsp;&nbsp;string&nbsp;content&nbsp;=&nbsp;Cache[\"AllUserOpenList_content\"]&nbsp;as&nbsp;string;\r\n\r\n&nbsp;&nbsp;if&nbsp;(content&nbsp;==&nbsp;null)\r\n&nbsp;&nbsp;{\r\n&nbsp;&nbsp;jsonres&nbsp;=&nbsp;\"https:\/\/api.weixin.qq.com\/cgi-bin\/user\/get?access_token=\"&nbsp;+&nbsp;Access_tokento;\r\n\r\n&nbsp;&nbsp;HttpWebRequest&nbsp;myRequest&nbsp;=&nbsp;(HttpWebRequest)WebRequest.Create(jsonres);\r\n&nbsp;&nbsp;myRequest.Method&nbsp;=&nbsp;\"GET\";\r\n&nbsp;&nbsp;HttpWebResponse&nbsp;myResponse&nbsp;=&nbsp;(HttpWebResponse)myRequest.GetResponse();\r\n&nbsp;&nbsp;StreamReader&nbsp;reader&nbsp;=&nbsp;new&nbsp;StreamReader(myResponse.GetResponseStream(),&nbsp;Encoding.UTF8);\r\n&nbsp;&nbsp;content&nbsp;=&nbsp;reader.ReadToEnd();\r\n&nbsp;&nbsp;reader.Close();\r\n\r\n&nbsp;&nbsp;\/\/\u8bbe\u7f6e\u7f13\u5b58\u7684\u6570\u636e7000\u79d2\u540e\u8fc7\u671f\r\n&nbsp;&nbsp;Cache.Insert(\"AllUserOpenList_content\",&nbsp;content,&nbsp;null,&nbsp;DateTime.Now.AddSeconds(7000),&nbsp;System.Web.Caching.Cache.NoSlidingExpiration);\r\n&nbsp;&nbsp;}\r\n\r\n&nbsp;&nbsp;\/\/\u4f7f\u7528\u524d\u9700\u8981\u5f15\u7528Newtonsoft.json.dll\u6587\u4ef6\r\n&nbsp;&nbsp;JObject&nbsp;jsonObj&nbsp;=&nbsp;JObject.Parse(content);\r\n\r\n\r\n&nbsp;&nbsp;int&nbsp;totalnum&nbsp;=&nbsp;int.Parse(jsonObj[\"count\"].ToString());\r\n\r\n\r\n&nbsp;&nbsp;List&lt;wxopenidinfo&gt;&nbsp;openidlist&nbsp;=&nbsp;new&nbsp;List&lt;wxopenidinfo&gt;();\r\n\r\n\r\n&nbsp;&nbsp;for&nbsp;(int&nbsp;i&nbsp;=&nbsp;0;&nbsp;i&nbsp;\r\n&nbsp;\/\/\/&nbsp;\u7ed1\u5b9a\u5206\u7ec4\u5217\u8868\r\n&nbsp;\/\/\/&nbsp;\r\n&nbsp;private&nbsp;void&nbsp;BindGroupList()\r\n&nbsp;{\r\n&nbsp;&nbsp;WeiXinServer&nbsp;wxs&nbsp;=&nbsp;new&nbsp;WeiXinServer();\r\n\r\n&nbsp;&nbsp;\/\/\/\u4ece\u7f13\u5b58\u8bfb\u53d6accesstoken\r\n&nbsp;&nbsp;string&nbsp;Access_token&nbsp;=&nbsp;Cache[\"Access_token\"]&nbsp;as&nbsp;string;\r\n\r\n&nbsp;&nbsp;if&nbsp;(Access_token&nbsp;==&nbsp;null)\r\n&nbsp;&nbsp;{\r\n&nbsp;&nbsp;\/\/\u5982\u679c\u4e3a\u7a7a\uff0c\u91cd\u65b0\u83b7\u53d6\r\n&nbsp;&nbsp;Access_token&nbsp;=&nbsp;wxs.GetAccessToken();\r\n\r\n&nbsp;&nbsp;\/\/\u8bbe\u7f6e\u7f13\u5b58\u7684\u6570\u636e7000\u79d2\u540e\u8fc7\u671f\r\n&nbsp;&nbsp;Cache.Insert(\"Access_token\",&nbsp;Access_token,&nbsp;null,&nbsp;DateTime.Now.AddSeconds(7000),&nbsp;System.Web.Caching.Cache.NoSlidingExpiration);\r\n&nbsp;&nbsp;}\r\n\r\n&nbsp;&nbsp;string&nbsp;Access_tokento&nbsp;=&nbsp;Access_token.Substring(17,&nbsp;Access_token.Length&nbsp;-&nbsp;37);\r\n\r\n&nbsp;&nbsp;string&nbsp;jsonres&nbsp;=&nbsp;\"\";\r\n\r\n&nbsp;&nbsp;string&nbsp;content&nbsp;=&nbsp;Cache[\"AllGroups_content\"]&nbsp;as&nbsp;string;\r\n\r\n&nbsp;&nbsp;if&nbsp;(content&nbsp;==&nbsp;null)\r\n&nbsp;&nbsp;{\r\n&nbsp;&nbsp;jsonres&nbsp;=&nbsp;\"https:\/\/api.weixin.qq.com\/cgi-bin\/groups\/get?access_token=\"&nbsp;+&nbsp;Access_tokento;\r\n\r\n&nbsp;&nbsp;HttpWebRequest&nbsp;myRequest&nbsp;=&nbsp;(HttpWebRequest)WebRequest.Create(jsonres);\r\n&nbsp;&nbsp;myRequest.Method&nbsp;=&nbsp;\"GET\";\r\n&nbsp;&nbsp;HttpWebResponse&nbsp;myResponse&nbsp;=&nbsp;(HttpWebResponse)myRequest.GetResponse();\r\n&nbsp;&nbsp;StreamReader&nbsp;reader&nbsp;=&nbsp;new&nbsp;StreamReader(myResponse.GetResponseStream(),&nbsp;Encoding.UTF8);\r\n&nbsp;&nbsp;content&nbsp;=&nbsp;reader.ReadToEnd();\r\n&nbsp;&nbsp;reader.Close();\r\n\r\n&nbsp;&nbsp;\/\/\u8bbe\u7f6e\u7f13\u5b58\u7684\u6570\u636e7000\u79d2\u540e\u8fc7\u671f\r\n&nbsp;&nbsp;Cache.Insert(\"AllGroups_content\",&nbsp;content,&nbsp;null,&nbsp;DateTime.Now.AddSeconds(7000),&nbsp;System.Web.Caching.Cache.NoSlidingExpiration);\r\n&nbsp;&nbsp;}\r\n\r\n&nbsp;&nbsp;\/\/\u4f7f\u7528\u524d\u9700\u8981\u5f15\u7528Newtonsoft.json.dll\u6587\u4ef6\r\n&nbsp;&nbsp;JObject&nbsp;jsonObj&nbsp;=&nbsp;JObject.Parse(content);\r\n\r\n\r\n&nbsp;&nbsp;int&nbsp;groupsnum&nbsp;=&nbsp;jsonObj[\"groups\"].Count();\r\n\r\n&nbsp;&nbsp;this.DDLgroups.Items.Clear();\/\/\u6e05\u9664\r\n&nbsp;&nbsp;this.DDlAddgroups.Items.Clear();\r\n&nbsp;&nbsp;this.DDLgroups.Items.Insert(0,&nbsp;new&nbsp;ListItem(\"\u5206\u7ec4\u7edf\u8ba1\",&nbsp;\"0\"));\/\/\u6dfb\u52a0\u9ed8\u8ba4\u7b2c\u4e00\u4e2a\u63d0\u793a\r\n&nbsp;&nbsp;this.DDlAddgroups.Items.Insert(0,&nbsp;new&nbsp;ListItem(\"\u79fb\u52a8\u7528\u6237\u5230\u5206\u7ec4\",&nbsp;\"0\"));\r\n&nbsp;&nbsp;for&nbsp;(int&nbsp;i&nbsp;=&nbsp;0;&nbsp;i&nbsp;\r\n&nbsp;\/\/\/&nbsp;\u8f93\u5165\u9875\u7801\u63d0\u4ea4\u8df3\u8f6c\r\n&nbsp;\/\/\/&nbsp;\r\n&nbsp;\/\/\/&nbsp;&lt;param&gt;\r\n&nbsp;\/\/\/&nbsp;&lt;param&gt;\r\n&nbsp;protected&nbsp;void&nbsp;LinkBtnToPage_Click(object&nbsp;sender,&nbsp;EventArgs&nbsp;e)\r\n&nbsp;{\r\n\r\n&nbsp;&nbsp;if&nbsp;(String.IsNullOrWhiteSpace(this.txtPageIndex.Text.ToString().Trim()))\r\n&nbsp;&nbsp;{\r\n&nbsp;&nbsp;ScriptManager.RegisterClientScriptBlock(this.Page,&nbsp;this.GetType(),&nbsp;\"\",&nbsp;\"alert('\u9875\u7801\u4e0d\u80fd\u4e3a\u7a7a\uff01')\",&nbsp;true);\r\n&nbsp;&nbsp;this.txtPageIndex.Focus();\r\n&nbsp;&nbsp;return;\r\n&nbsp;&nbsp;}\r\n&nbsp;&nbsp;if&nbsp;(IsNum(this.txtPageIndex.Text.ToString().Trim()))\r\n&nbsp;&nbsp;{\r\n&nbsp;&nbsp;ScriptManager.RegisterClientScriptBlock(this.Page,&nbsp;this.GetType(),&nbsp;\"\",&nbsp;\"alert('\u9875\u7801\u6570\u53ea\u80fd\u8f93\u5165\u6570\u5b57\uff01')\",&nbsp;true);\r\n&nbsp;&nbsp;this.txtPageIndex.Focus();\r\n&nbsp;&nbsp;this.txtPageIndex.Text&nbsp;=&nbsp;this.lbPageIndex.Text.ToString();\r\n&nbsp;&nbsp;return;\r\n&nbsp;&nbsp;}\r\n&nbsp;&nbsp;if&nbsp;(int.Parse(this.txtPageIndex.Text.ToString().Trim())&nbsp;&amp;gt;&nbsp;int.Parse(this.lbCountPage.Text.ToString().Trim()))\r\n&nbsp;&nbsp;{\r\n&nbsp;&nbsp;ScriptManager.RegisterClientScriptBlock(this.Page,&nbsp;this.GetType(),&nbsp;\"\",&nbsp;\"alert('\u6240\u8f93\u9875\u6570\u4e0d\u80fd\u5927\u4e8e\u603b\u9875\u6570\uff01')\",&nbsp;true);\r\n&nbsp;&nbsp;this.txtPageIndex.Focus();\r\n&nbsp;&nbsp;this.txtPageIndex.Text&nbsp;=&nbsp;this.lbPageIndex.Text.ToString();\r\n&nbsp;&nbsp;return;\r\n&nbsp;&nbsp;}\r\n\r\n&nbsp;&nbsp;BindGetAllUserOpenIdList();\r\n&nbsp;}\r\n&nbsp;\/\/\/&nbsp;&lt;summary&gt;\r\n&nbsp;\/\/\/&nbsp;\u5224\u65ad\u662f\u5426\u662f\u6570\u5b57\r\n&nbsp;\/\/\/&nbsp;&lt;\/summary&gt;\r\n&nbsp;\/\/\/&nbsp;&lt;param&gt;\r\n&nbsp;\/\/\/&nbsp;&lt;returns&gt;&lt;\/returns&gt;\r\n&nbsp;public&nbsp;static&nbsp;bool&nbsp;IsNum(string&nbsp;text)&nbsp;\/\/\r\n&nbsp;{\r\n&nbsp;&nbsp;for&nbsp;(int&nbsp;i&nbsp;=&nbsp;0;&nbsp;i&nbsp;\r\n&nbsp;\/\/\/&nbsp;\u7ed1\u5b9a\u7528\u6237\u57fa\u672c\u4fe1\u606f\u4e8b\u4ef6\r\n&nbsp;\/\/\/&nbsp;\r\n&nbsp;\/\/\/&nbsp;&lt;param&gt;\r\n&nbsp;\/\/\/&nbsp;&lt;param&gt;\r\n&nbsp;protected&nbsp;void&nbsp;RepeaterWxUserList_ItemDataBound(object&nbsp;sender,&nbsp;RepeaterItemEventArgs&nbsp;e)\r\n&nbsp;{\r\n&nbsp;&nbsp;\/\/CheckBox&nbsp;checkIn&nbsp;=&nbsp;e.Item.FindControl(\"CheckIn\")&nbsp;as&nbsp;CheckBox;\r\n\r\n&nbsp;&nbsp;\/\/checkIn.AutoPostBack&nbsp;=&nbsp;true;\r\n\r\n\r\n&nbsp;&nbsp;if(e.Item.ItemType==ListItemType.Item||e.Item.ItemType==ListItemType.AlternatingItem)\r\n&nbsp;&nbsp;{\r\n&nbsp;&nbsp;WxOpenIdInfo&nbsp;wxopen&nbsp;=&nbsp;e.Item.DataItem&nbsp;as&nbsp;WxOpenIdInfo;\r\n\r\n\r\n&nbsp;&nbsp;Label&nbsp;lbwxopenID&nbsp;=&nbsp;e.Item.FindControl(\"lbwxopenID\")&nbsp;as&nbsp;Label;\r\n\r\n&nbsp;&nbsp;lbwxopenID.Text&nbsp;=&nbsp;wxopen.WxopenId.ToString();\r\n\r\n&nbsp;&nbsp;\/\/\u6839\u636eOpenID\u83b7\u53d6\u7528\u6237\u57fa\u672c\u4fe1\u606f\u3002\u7f13\u5b58\u5904\u7406\r\n&nbsp;&nbsp;WeiXinServer&nbsp;wxs&nbsp;=&nbsp;new&nbsp;WeiXinServer();\r\n\r\n&nbsp;&nbsp;\/\/\/\u4ece\u7f13\u5b58\u8bfb\u53d6accesstoken\r\n&nbsp;&nbsp;string&nbsp;Access_token&nbsp;=&nbsp;Cache[\"Access_token\"]&nbsp;as&nbsp;string;\r\n\r\n&nbsp;&nbsp;if&nbsp;(Access_token&nbsp;==&nbsp;null)\r\n&nbsp;&nbsp;{\r\n&nbsp;&nbsp;&nbsp;\/\/\u5982\u679c\u4e3a\u7a7a\uff0c\u91cd\u65b0\u83b7\u53d6\r\n&nbsp;&nbsp;&nbsp;Access_token&nbsp;=&nbsp;wxs.GetAccessToken();\r\n\r\n&nbsp;&nbsp;&nbsp;\/\/\u8bbe\u7f6e\u7f13\u5b58\u7684\u6570\u636e7000\u79d2\u540e\u8fc7\u671f\r\n&nbsp;&nbsp;&nbsp;Cache.Insert(\"Access_token\",&nbsp;Access_token,&nbsp;null,&nbsp;DateTime.Now.AddSeconds(7000),&nbsp;System.Web.Caching.Cache.NoSlidingExpiration);\r\n&nbsp;&nbsp;}\r\n\r\n&nbsp;&nbsp;string&nbsp;Access_tokento&nbsp;=&nbsp;Access_token.Substring(17,&nbsp;Access_token.Length&nbsp;-&nbsp;37);\r\n\r\n&nbsp;&nbsp;string&nbsp;jsonres&nbsp;=\"https:\/\/api.weixin.qq.com\/cgi-bin\/user\/info?access_token=\"&nbsp;+&nbsp;Access_tokento&nbsp;+&nbsp;\"&amp;amp;openid=\"&nbsp;+&nbsp;lbwxopenID.Text.ToString();\r\n\r\n&nbsp;&nbsp;HttpWebRequest&nbsp;myRequest&nbsp;=&nbsp;(HttpWebRequest)WebRequest.Create(jsonres);\r\n&nbsp;&nbsp;myRequest.Method&nbsp;=&nbsp;\"GET\";\r\n&nbsp;&nbsp;HttpWebResponse&nbsp;myResponse&nbsp;=&nbsp;(HttpWebResponse)myRequest.GetResponse();\r\n&nbsp;&nbsp;StreamReader&nbsp;reader&nbsp;=&nbsp;new&nbsp;StreamReader(myResponse.GetResponseStream(),&nbsp;Encoding.UTF8);\r\n&nbsp;&nbsp;string&nbsp;content&nbsp;=&nbsp;reader.ReadToEnd();\r\n&nbsp;&nbsp;reader.Close();\r\n\r\n&nbsp;&nbsp;\/\/\u4f7f\u7528\u524d\u9700\u8981\u5f15\u7528Newtonsoft.json.dll\u6587\u4ef6\r\n&nbsp;&nbsp;JObject&nbsp;jsonObj&nbsp;=&nbsp;JObject.Parse(content);\r\n\r\n\r\n&nbsp;&nbsp;Image&nbsp;ImgHeadUrl&nbsp;=&nbsp;e.Item.FindControl(\"ImgHeadUrl\")&nbsp;as&nbsp;Image;\r\n&nbsp;&nbsp;Label&nbsp;lbNickName&nbsp;=&nbsp;e.Item.FindControl(\"lbNickName\")&nbsp;as&nbsp;Label;\r\n&nbsp;&nbsp;Label&nbsp;lbRemark&nbsp;=&nbsp;e.Item.FindControl(\"lbRemark\")&nbsp;as&nbsp;Label;\r\n&nbsp;&nbsp;Label&nbsp;lbSubscrine_time&nbsp;=&nbsp;e.Item.FindControl(\"lbSubscrine_time\")&nbsp;as&nbsp;Label;\r\n\r\n&nbsp;&nbsp;Label&nbsp;lbgroupId&nbsp;=&nbsp;e.Item.FindControl(\"lbgroupId\")&nbsp;as&nbsp;Label;\r\n\r\n&nbsp;&nbsp;DropDownList&nbsp;DDlAddgroupss&nbsp;=&nbsp;e.Item.FindControl(\"DDlAddgroupss\")&nbsp;as&nbsp;DropDownList;\r\n\r\n&nbsp;&nbsp;lbNickName.Text&nbsp;=&nbsp;jsonObj[\"nickname\"].ToString();\r\n\r\n&nbsp;&nbsp;if&nbsp;(!String.IsNullOrWhiteSpace(jsonObj[\"remark\"].ToString()))\r\n&nbsp;&nbsp;{\r\n&nbsp;&nbsp;&nbsp;lbRemark.Text&nbsp;=&nbsp;\"(\"&nbsp;+&nbsp;jsonObj[\"remark\"].ToString()&nbsp;+&nbsp;\")\";\r\n&nbsp;&nbsp;}\r\n\r\n&nbsp;&nbsp;ImgHeadUrl.ImageUrl&nbsp;=&nbsp;jsonObj[\"headimgurl\"].ToString();\r\n&nbsp;&nbsp;lbgroupId.Text&nbsp;=&nbsp;jsonObj[\"groupid\"].ToString();\r\n\r\n&nbsp;&nbsp;\/\/\u83b7\u53d6\u5173\u6ce8\u65f6\u95f4\r\n&nbsp;&nbsp;int&nbsp;totaltiem&nbsp;=&nbsp;int.Parse(jsonObj[\"subscribe_time\"].ToString());\r\n&nbsp;&nbsp;\/\/\u5c06\u6574\u578b\u683c\u5f0f\u65f6\u95f4\u8f6c\u6362\u4e3a\u65f6\u95f4\u683c\u5f0f\r\n&nbsp;&nbsp;DateTime&nbsp;t&nbsp;=&nbsp;new&nbsp;DateTime(1970,&nbsp;1,&nbsp;1).AddSeconds(totaltiem);\r\n&nbsp;&nbsp;\/\/\u8f6c\u6362\u540e\u7684\u65f6\u95f4\u4f1a\u6bd4\u539f\u6709\u65f6\u95f4\u5c0f8\u4e2a\u5c0f\u65f6\uff0c\u56e0\u6b64\u9700\u8981\u52a0\u4e0a8\u4e2a\u5c0f\u65f6\r\n&nbsp;&nbsp;lbSubscrine_time.Text&nbsp;=&nbsp;t.AddHours(8).ToString();\r\n\r\n\r\n&nbsp;&nbsp;string&nbsp;jjjjjjjjjddd&nbsp;=&nbsp;Cache[\"AllGroups_content\"]&nbsp;as&nbsp;string;\r\n\r\n&nbsp;&nbsp;if&nbsp;(jjjjjjjjjddd&nbsp;==&nbsp;null)\r\n&nbsp;&nbsp;{\r\n&nbsp;&nbsp;&nbsp;jsonres&nbsp;=&nbsp;\"https:\/\/api.weixin.qq.com\/cgi-bin\/groups\/get?access_token=\"&nbsp;+&nbsp;Access_tokento;\r\n\r\n&nbsp;&nbsp;&nbsp;HttpWebRequest&nbsp;myRequestss&nbsp;=&nbsp;(HttpWebRequest)WebRequest.Create(jsonres);\r\n&nbsp;&nbsp;&nbsp;myRequest.Method&nbsp;=&nbsp;\"GET\";\r\n&nbsp;&nbsp;&nbsp;HttpWebResponse&nbsp;myResponsess&nbsp;=&nbsp;(HttpWebResponse)myRequest.GetResponse();\r\n&nbsp;&nbsp;&nbsp;StreamReader&nbsp;readerss&nbsp;=&nbsp;new&nbsp;StreamReader(myResponse.GetResponseStream(),&nbsp;Encoding.UTF8);\r\n&nbsp;&nbsp;&nbsp;jjjjjjjjjddd&nbsp;=&nbsp;reader.ReadToEnd();\r\n&nbsp;&nbsp;&nbsp;reader.Close();\r\n\r\n&nbsp;&nbsp;&nbsp;\/\/\u8bbe\u7f6e\u7f13\u5b58\u7684\u6570\u636e7000\u79d2\u540e\u8fc7\u671f\r\n&nbsp;&nbsp;&nbsp;Cache.Insert(\"AllGroups_content\",&nbsp;jjjjjjjjjddd,&nbsp;null,&nbsp;DateTime.Now.AddSeconds(7000),&nbsp;System.Web.Caching.Cache.NoSlidingExpiration);\r\n&nbsp;&nbsp;}\r\n\r\n&nbsp;&nbsp;\/\/\u4f7f\u7528\u524d\u9700\u8981\u5f15\u7528Newtonsoft.json.dll\u6587\u4ef6\r\n&nbsp;&nbsp;JObject&nbsp;jsonObjss&nbsp;=&nbsp;JObject.Parse(jjjjjjjjjddd);\r\n\r\n\r\n&nbsp;&nbsp;int&nbsp;groupsnumss&nbsp;=&nbsp;jsonObjss[\"groups\"].Count();\r\n\r\n&nbsp;&nbsp;for&nbsp;(int&nbsp;i&nbsp;=&nbsp;0;&nbsp;i&nbsp;\r\n&nbsp;\/\/\/&nbsp;\u521b\u5efa\u5206\u7ec4\r\n&nbsp;\/\/\/&nbsp;\r\n&nbsp;\/\/\/&nbsp;&lt;param&gt;\r\n&nbsp;\/\/\/&nbsp;&lt;param&gt;\r\n&nbsp;protected&nbsp;void&nbsp;LinkBtnCreateGroup_Click(object&nbsp;sender,&nbsp;EventArgs&nbsp;e)\r\n&nbsp;{\r\n&nbsp;&nbsp;if&nbsp;(this.txtgroupsName.Value.ToString().Equals(\"\u5206\u7ec4\u540d\u79f0\"))\r\n&nbsp;&nbsp;{\r\n&nbsp;&nbsp;\/\/\/\/\r\n&nbsp;&nbsp;ScriptManager.RegisterClientScriptBlock(this.Page,this.GetType(),\"\",\"alert('\u4e0d\u80fd\u4e3a\u7a7a\uff01')\",true);\r\n&nbsp;&nbsp;this.txtgroupsName.Focus();\r\n&nbsp;&nbsp;return;\r\n&nbsp;&nbsp;}\r\n\r\n\r\n&nbsp;&nbsp;WeiXinServer&nbsp;wxs&nbsp;=&nbsp;new&nbsp;WeiXinServer();\r\n&nbsp;&nbsp;string&nbsp;res&nbsp;=&nbsp;\"\";\r\n\r\n&nbsp;&nbsp;\/\/\/\u4ece\u7f13\u5b58\u8bfb\u53d6accesstoken\r\n&nbsp;&nbsp;string&nbsp;Access_token&nbsp;=&nbsp;Cache[\"Access_token\"]&nbsp;as&nbsp;string;\r\n\r\n&nbsp;&nbsp;if&nbsp;(Access_token&nbsp;==&nbsp;null)\r\n&nbsp;&nbsp;{\r\n&nbsp;&nbsp;\/\/\u5982\u679c\u4e3a\u7a7a\uff0c\u91cd\u65b0\u83b7\u53d6\r\n&nbsp;&nbsp;Access_token&nbsp;=&nbsp;wxs.GetAccessToken();\r\n\r\n&nbsp;&nbsp;\/\/\u8bbe\u7f6e\u7f13\u5b58\u7684\u6570\u636e7000\u79d2\u540e\u8fc7\u671f\r\n&nbsp;&nbsp;Cache.Insert(\"Access_token\",&nbsp;Access_token,&nbsp;null,&nbsp;DateTime.Now.AddSeconds(7000),&nbsp;System.Web.Caching.Cache.NoSlidingExpiration);\r\n&nbsp;&nbsp;}\r\n\r\n&nbsp;&nbsp;string&nbsp;Access_tokento&nbsp;=&nbsp;Access_token.Substring(17,&nbsp;Access_token.Length&nbsp;-&nbsp;37);\r\n\r\n\r\n&nbsp;&nbsp;string&nbsp;posturl&nbsp;=&nbsp;\"https:\/\/api.weixin.qq.com\/cgi-bin\/groups\/create?access_token=\"&nbsp;+&nbsp;Access_tokento;\r\n\r\n&nbsp;&nbsp;\/\/string&nbsp;postData&nbsp;=&nbsp;\"{\"group\":{\"name\":\"\"+this.txtgroupsName.Value.ToString().Trim()+\"\"}}\";\r\n\r\n&nbsp;&nbsp;string&nbsp;postData&nbsp;=&nbsp;\"{\"group\":{\"name\":\"\"+this.txtgroupsName.Value.ToString().Trim()+\"\"}}\";\r\n\r\n\r\n&nbsp;&nbsp;res&nbsp;=&nbsp;wxs.GetPage(posturl,&nbsp;postData);\r\n\r\n\r\n&nbsp;&nbsp;ScriptManager.RegisterClientScriptBlock(this.Page,&nbsp;this.GetType(),&nbsp;\"\",&nbsp;\"alert('\u521b\u5efa\u6210\u529f\uff01\u5982\u672a\u663e\u793a\uff0c\u8bf7\u9000\u51fa\u91cd\u65b0\u767b\u5f55\u5373\u53ef\uff01');location='WeiXinUserList.aspx';\",&nbsp;true);\r\n&nbsp;}\r\n&nbsp;\/\/\/&nbsp;&lt;summary&gt;\r\n&nbsp;\/\/\/&nbsp;\u5168\u9009\u3001\u5168\u4e0d\u9009\r\n&nbsp;\/\/\/&nbsp;&lt;\/summary&gt;\r\n&nbsp;\/\/\/&nbsp;&lt;param&gt;\r\n&nbsp;\/\/\/&nbsp;&lt;param&gt;\r\n&nbsp;protected&nbsp;void&nbsp;CheckAll_CheckedChanged(object&nbsp;sender,&nbsp;EventArgs&nbsp;e)\r\n&nbsp;{\r\n&nbsp;&nbsp;CheckBox&nbsp;checkAll&nbsp;=&nbsp;(CheckBox)sender;\r\n&nbsp;&nbsp;foreach&nbsp;(RepeaterItem&nbsp;item&nbsp;in&nbsp;this.RepeaterWxUserList.Items)\r\n&nbsp;&nbsp;{\r\n&nbsp;&nbsp;CheckBox&nbsp;checkIn&nbsp;=&nbsp;(CheckBox)item.FindControl(\"CheckIn\");\r\n&nbsp;&nbsp;checkIn.Checked&nbsp;=&nbsp;checkAll.Checked;\r\n&nbsp;&nbsp;}\r\n&nbsp;}\r\n\r\n&nbsp;\/\/\/&nbsp;&lt;summary&gt;\r\n&nbsp;\/\/\/&nbsp;\u79fb\u52a8\u7528\u6237\u5230\u5206\u7ec4\r\n&nbsp;\/\/\/&nbsp;&lt;\/summary&gt;\r\n&nbsp;\/\/\/&nbsp;&lt;param&gt;\r\n&nbsp;\/\/\/&nbsp;&lt;param&gt;\r\n&nbsp;protected&nbsp;void&nbsp;DDlAddgroups_SelectedIndexChanged(object&nbsp;sender,&nbsp;EventArgs&nbsp;e)\r\n&nbsp;{\r\n&nbsp;&nbsp;\/\/\/\u53d6\u5f97\u5206\u7ec4ID\r\n&nbsp;&nbsp;string&nbsp;groupId&nbsp;=&nbsp;this.DDlAddgroups.SelectedValue.ToString();\r\n\r\n&nbsp;&nbsp;\/\/this.Label1.Text&nbsp;=&nbsp;groupId.ToString();\r\n\r\n&nbsp;&nbsp;Boolean&nbsp;bools&nbsp;=&nbsp;false;\r\n\r\n&nbsp;&nbsp;foreach&nbsp;(RepeaterItem&nbsp;item&nbsp;in&nbsp;this.RepeaterWxUserList.Items)\r\n&nbsp;&nbsp;{\r\n&nbsp;&nbsp;CheckBox&nbsp;checkIn&nbsp;=&nbsp;(CheckBox)item.FindControl(\"CheckIn\");\r\n\r\n&nbsp;&nbsp;if&nbsp;(checkIn.Checked)\r\n&nbsp;&nbsp;{\r\n&nbsp;&nbsp;&nbsp;bools&nbsp;=&nbsp;true;\r\n\r\n&nbsp;&nbsp;&nbsp;Label&nbsp;lbwxopenID&nbsp;=&nbsp;item.FindControl(\"lbwxopenID\")&nbsp;as&nbsp;Label;\r\n\r\n\r\n&nbsp;&nbsp;&nbsp;WeiXinServer&nbsp;wxs&nbsp;=&nbsp;new&nbsp;WeiXinServer();\r\n&nbsp;&nbsp;&nbsp;string&nbsp;res&nbsp;=&nbsp;\"\";\r\n\r\n&nbsp;&nbsp;&nbsp;\/\/\/\u4ece\u7f13\u5b58\u8bfb\u53d6accesstoken\r\n&nbsp;&nbsp;&nbsp;string&nbsp;Access_token&nbsp;=&nbsp;Cache[\"Access_token\"]&nbsp;as&nbsp;string;\r\n\r\n&nbsp;&nbsp;&nbsp;if&nbsp;(Access_token&nbsp;==&nbsp;null)\r\n&nbsp;&nbsp;&nbsp;{\r\n&nbsp;&nbsp;&nbsp;\/\/\u5982\u679c\u4e3a\u7a7a\uff0c\u91cd\u65b0\u83b7\u53d6\r\n&nbsp;&nbsp;&nbsp;Access_token&nbsp;=&nbsp;wxs.GetAccessToken();\r\n\r\n&nbsp;&nbsp;&nbsp;\/\/\u8bbe\u7f6e\u7f13\u5b58\u7684\u6570\u636e7000\u79d2\u540e\u8fc7\u671f\r\n&nbsp;&nbsp;&nbsp;Cache.Insert(\"Access_token\",&nbsp;Access_token,&nbsp;null,&nbsp;DateTime.Now.AddSeconds(7000),&nbsp;System.Web.Caching.Cache.NoSlidingExpiration);\r\n&nbsp;&nbsp;&nbsp;}\r\n\r\n&nbsp;&nbsp;&nbsp;string&nbsp;Access_tokento&nbsp;=&nbsp;Access_token.Substring(17,&nbsp;Access_token.Length&nbsp;-&nbsp;37);\r\n\r\n\r\n&nbsp;&nbsp;&nbsp;string&nbsp;posturl&nbsp;=&nbsp;\"https:\/\/api.weixin.qq.com\/cgi-bin\/groups\/members\/update?access_token=\"&nbsp;+&nbsp;Access_tokento;\r\n\r\n\r\n&nbsp;&nbsp;&nbsp;\/\/POST\u6570\u636e\u4f8b\u5b50\uff1a{\"openid\":\"oDF3iYx0ro3_7jD4HFRDfrjdCM58\",\"to_groupid\":108}\r\n&nbsp;&nbsp;&nbsp;\/\/string&nbsp;postData&nbsp;=&nbsp;\"{\"openid\":\"\"&nbsp;+&nbsp;openid.ToString().Trim()&nbsp;+&nbsp;\"\",\"remark\":\"\"&nbsp;+&nbsp;this.txtRemarkName.Value.ToString()&nbsp;+&nbsp;\"\"}\";\r\n\r\n&nbsp;&nbsp;&nbsp;string&nbsp;postData&nbsp;=&nbsp;\"{\"openid\":\"\"&nbsp;+&nbsp;lbwxopenID.Text.ToString()&nbsp;+&nbsp;\"\",\"to_groupid\":\"\"&nbsp;+&nbsp;groupId.ToString()&nbsp;+&nbsp;\"\"}\";\r\n\r\n\r\n&nbsp;&nbsp;&nbsp;res&nbsp;=&nbsp;wxs.GetPage(posturl,&nbsp;postData);\r\n\r\n\r\n&nbsp;&nbsp;&nbsp;\/\/\u4f7f\u7528\u524d\u9700\u8981\u5f15\u7528Newtonsoft.json.dll\u6587\u4ef6\r\n&nbsp;&nbsp;&nbsp;JObject&nbsp;jsonObj&nbsp;=&nbsp;JObject.Parse(res);\r\n\r\n&nbsp;&nbsp;&nbsp;\/\/\/\u83b7\u53d6\u8fd4\u56de\u7ed3\u679c\u7684\u6b63\u786e|true|false,\r\n&nbsp;&nbsp;&nbsp;string&nbsp;isright&nbsp;=&nbsp;jsonObj[\"errcode\"].ToString();\/\/0\r\n&nbsp;&nbsp;&nbsp;string&nbsp;istrueorfalse&nbsp;=&nbsp;jsonObj[\"errmsg\"].ToString();\/\/ok\r\n&nbsp;&nbsp;&nbsp;if&nbsp;(isright.Equals(\"0\")&nbsp;&amp;amp;&amp;amp;&nbsp;istrueorfalse.Equals(\"ok\"))\r\n&nbsp;&nbsp;&nbsp;{\r\n&nbsp;&nbsp;&nbsp;ScriptManager.RegisterClientScriptBlock(this.Page,&nbsp;this.GetType(),&nbsp;\"\",&nbsp;\"alert('\u79fb\u52a8\u7528\u6237\u6210\u529f\uff01');location='WeiXinUserList.aspx';\",&nbsp;true);\r\n&nbsp;&nbsp;&nbsp;}\r\n&nbsp;&nbsp;&nbsp;else\r\n&nbsp;&nbsp;&nbsp;{\r\n&nbsp;&nbsp;&nbsp;ScriptManager.RegisterClientScriptBlock(this.Page,&nbsp;this.GetType(),&nbsp;\"\",&nbsp;\"alert('\u79fb\u52a8\u7528\u6237\u5931\u8d25\uff01');\",&nbsp;true);\r\n&nbsp;&nbsp;&nbsp;return;\r\n&nbsp;&nbsp;&nbsp;}\r\n&nbsp;&nbsp;}\r\n\r\n&nbsp;&nbsp;}\r\n&nbsp;&nbsp;if&nbsp;(!bools)\r\n&nbsp;&nbsp;{\r\n&nbsp;&nbsp;ScriptManager.RegisterClientScriptBlock(this.Page,&nbsp;this.GetType(),&nbsp;\"\",&nbsp;\"alert('\u672a\u9009\u4e2d\u9879\uff01');location='WeiXinUserList.aspx';\",&nbsp;true);\r\n&nbsp;&nbsp;return;\r\n&nbsp;&nbsp;}\r\n&nbsp;}&lt;\/wxopenidinfo&gt;&lt;\/wxopenidinfo&gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>&nbsp;<strong>WeiXinServer wxs = new WeiXinServer();\u662f\u5355\u72ec\u521b\u5efa\u7684\u4e00\u4e2a\u7c7b\uff0c\u4e3b\u8981\u7528\u6765\u83b7\u53d6\u901a\u884c\u8bc1\u548c\u52a0\u8f7d\u6d41\u7684\u65b9\u6cd5\uff0c\u4ee3\u7801\u5982\u4e0b\uff1a<\/strong><\/p>\n<pre>&nbsp;\/\/\/&nbsp;&lt;summary&gt;\r\n&nbsp;\/\/\/&nbsp;\u5fae\u4fe1\u670d\u52a1\u7c7b\r\n&nbsp;\/\/\/&nbsp;&lt;\/summary&gt;\r\n&nbsp;public&nbsp;class&nbsp;WeiXinServer\r\n&nbsp;{\r\n&nbsp;\/\/\/&nbsp;&lt;summary&gt;\r\n&nbsp;\/\/\/&nbsp;\u83b7\u53d6\u901a\u884c\u8bc1\r\n&nbsp;\/\/\/&nbsp;&lt;\/summary&gt;\r\n&nbsp;\/\/\/&nbsp;&lt;returns&gt;&lt;\/returns&gt;\r\n&nbsp;public&nbsp;string&nbsp;GetAccessToken()\r\n&nbsp;{\r\n&nbsp;&nbsp;string&nbsp;url_token&nbsp;=&nbsp;\"https:\/\/api.weixin.qq.com\/cgi-bin\/token?grant_type=client_credential&amp;amp;appid=\u6b64\u5904\u5e94\u8be5\u586b\u5199\u516c\u4f17\u7684appid&amp;amp;secret=\u6b64\u5904\u5e94\u8be5\u586b\u5199\u516c\u4f17\u53f7\u7684secret\";\r\n&nbsp;&nbsp;HttpWebRequest&nbsp;myRequest&nbsp;=&nbsp;(HttpWebRequest)WebRequest.Create(url_token);\r\n&nbsp;&nbsp;myRequest.Method&nbsp;=&nbsp;\"GET\";\r\n&nbsp;&nbsp;HttpWebResponse&nbsp;myResponse&nbsp;=&nbsp;(HttpWebResponse)myRequest.GetResponse();\r\n&nbsp;&nbsp;StreamReader&nbsp;reader&nbsp;=&nbsp;new&nbsp;StreamReader(myResponse.GetResponseStream(),&nbsp;Encoding.UTF8);\r\n&nbsp;&nbsp;string&nbsp;content&nbsp;=&nbsp;reader.ReadToEnd();\r\n&nbsp;&nbsp;reader.Close();\r\n&nbsp;&nbsp;return&nbsp;content;\r\n&nbsp;}\r\n&nbsp;public&nbsp;string&nbsp;GetPage(string&nbsp;p,&nbsp;string&nbsp;postData)\r\n&nbsp;{\r\n&nbsp;&nbsp;Stream&nbsp;outstream&nbsp;=&nbsp;null;\r\n&nbsp;&nbsp;Stream&nbsp;instream&nbsp;=&nbsp;null;\r\n&nbsp;&nbsp;StreamReader&nbsp;sr&nbsp;=&nbsp;null;\r\n&nbsp;&nbsp;HttpWebResponse&nbsp;response&nbsp;=&nbsp;null;\r\n&nbsp;&nbsp;HttpWebRequest&nbsp;request&nbsp;=&nbsp;null;\r\n&nbsp;&nbsp;Encoding&nbsp;encoding&nbsp;=&nbsp;Encoding.UTF8;\r\n&nbsp;&nbsp;byte[]&nbsp;data&nbsp;=&nbsp;encoding.GetBytes(postData);\r\n&nbsp;&nbsp;\/\/&nbsp;\u51c6\u5907\u8bf7\u6c42...\r\n&nbsp;&nbsp;try\r\n&nbsp;&nbsp;{\r\n&nbsp;&nbsp;\/\/&nbsp;\u8bbe\u7f6e\u53c2\u6570\r\n&nbsp;&nbsp;request&nbsp;=&nbsp;WebRequest.Create(p)&nbsp;as&nbsp;HttpWebRequest;\r\n&nbsp;&nbsp;CookieContainer&nbsp;cookieContainer&nbsp;=&nbsp;new&nbsp;CookieContainer();\r\n&nbsp;&nbsp;request.CookieContainer&nbsp;=&nbsp;cookieContainer;\r\n&nbsp;&nbsp;request.AllowAutoRedirect&nbsp;=&nbsp;true;\r\n&nbsp;&nbsp;request.Method&nbsp;=&nbsp;\"POST\";\r\n&nbsp;&nbsp;request.ContentType&nbsp;=&nbsp;\"application\/x-www-form-urlencoded\";\r\n&nbsp;&nbsp;request.ContentLength&nbsp;=&nbsp;data.Length;\r\n&nbsp;&nbsp;outstream&nbsp;=&nbsp;request.GetRequestStream();\r\n&nbsp;&nbsp;outstream.Write(data,&nbsp;0,&nbsp;data.Length);\r\n&nbsp;&nbsp;outstream.Close();\r\n&nbsp;&nbsp;\/\/\u53d1\u9001\u8bf7\u6c42\u5e76\u83b7\u53d6\u76f8\u5e94\u56de\u5e94\u6570\u636e\r\n&nbsp;&nbsp;response&nbsp;=&nbsp;request.GetResponse()&nbsp;as&nbsp;HttpWebResponse;\r\n&nbsp;&nbsp;\/\/\u76f4\u5230request.GetResponse()\u7a0b\u5e8f\u624d\u5f00\u59cb\u5411\u76ee\u6807\u7f51\u9875\u53d1\u9001Post\u8bf7\u6c42\r\n&nbsp;&nbsp;instream&nbsp;=&nbsp;response.GetResponseStream();\r\n&nbsp;&nbsp;sr&nbsp;=&nbsp;new&nbsp;StreamReader(instream,&nbsp;encoding);\r\n&nbsp;&nbsp;\/\/\u8fd4\u56de\u7ed3\u679c\u7f51\u9875\uff08html\uff09\u4ee3\u7801\r\n&nbsp;&nbsp;string&nbsp;content&nbsp;=&nbsp;sr.ReadToEnd();\r\n&nbsp;&nbsp;string&nbsp;err&nbsp;=&nbsp;string.Empty;\r\n&nbsp;&nbsp;return&nbsp;content;\r\n&nbsp;&nbsp;}\r\n&nbsp;&nbsp;catch&nbsp;(Exception&nbsp;ex)\r\n&nbsp;&nbsp;{\r\n&nbsp;&nbsp;string&nbsp;err&nbsp;=&nbsp;ex.Message;\r\n&nbsp;&nbsp;return&nbsp;string.Empty;\r\n&nbsp;&nbsp;}\r\n&nbsp;}\r\n&nbsp;}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>\u4fee\u6539\u5907\u6ce8\u9875\u9762\u7684\u4ee3\u7801\uff1a<\/strong><\/p>\n<pre>&nbsp;protected&nbsp;void&nbsp;Page_Load(object&nbsp;sender,&nbsp;EventArgs&nbsp;e)\r\n&nbsp;{\r\n&nbsp;&nbsp;if(Request.QueryString[\"id\"]!=null)\r\n&nbsp;&nbsp;{\r\n&nbsp;&nbsp;String&nbsp;openid&nbsp;=&nbsp;Request.QueryString[\"id\"].ToString();\r\n&nbsp;&nbsp;this.txtOpenId.Value&nbsp;=&nbsp;openid.ToString();\r\n\r\n&nbsp;&nbsp;\/\/\u6839\u636eOpenID\u83b7\u53d6\u7528\u6237\u57fa\u672c\u4fe1\u606f\u3002\u7f13\u5b58\u5904\u7406\r\n&nbsp;&nbsp;WeiXinServer&nbsp;wxs&nbsp;=&nbsp;new&nbsp;WeiXinServer();\r\n\r\n&nbsp;&nbsp;\/\/\/\u4ece\u7f13\u5b58\u8bfb\u53d6accesstoken\r\n&nbsp;&nbsp;string&nbsp;Access_token&nbsp;=&nbsp;Cache[\"Access_token\"]&nbsp;as&nbsp;string;\r\n\r\n&nbsp;&nbsp;if&nbsp;(Access_token&nbsp;==&nbsp;null)\r\n&nbsp;&nbsp;{\r\n&nbsp;&nbsp;&nbsp;\/\/\u5982\u679c\u4e3a\u7a7a\uff0c\u91cd\u65b0\u83b7\u53d6\r\n&nbsp;&nbsp;&nbsp;Access_token&nbsp;=&nbsp;wxs.GetAccessToken();\r\n\r\n&nbsp;&nbsp;&nbsp;\/\/\u8bbe\u7f6e\u7f13\u5b58\u7684\u6570\u636e7000\u79d2\u540e\u8fc7\u671f\r\n&nbsp;&nbsp;&nbsp;Cache.Insert(\"Access_token\",&nbsp;Access_token,&nbsp;null,&nbsp;DateTime.Now.AddSeconds(7000),&nbsp;System.Web.Caching.Cache.NoSlidingExpiration);\r\n&nbsp;&nbsp;}\r\n\r\n&nbsp;&nbsp;string&nbsp;Access_tokento&nbsp;=&nbsp;Access_token.Substring(17,&nbsp;Access_token.Length&nbsp;-&nbsp;37);\r\n\r\n&nbsp;&nbsp;string&nbsp;jsonres&nbsp;=&nbsp;\"https:\/\/api.weixin.qq.com\/cgi-bin\/user\/info?access_token=\"&nbsp;+&nbsp;Access_tokento&nbsp;+&nbsp;\"&amp;amp;openid=\"&nbsp;+&nbsp;openid;\r\n\r\n&nbsp;&nbsp;HttpWebRequest&nbsp;myRequest&nbsp;=&nbsp;(HttpWebRequest)WebRequest.Create(jsonres);\r\n&nbsp;&nbsp;myRequest.Method&nbsp;=&nbsp;\"GET\";\r\n&nbsp;&nbsp;HttpWebResponse&nbsp;myResponse&nbsp;=&nbsp;(HttpWebResponse)myRequest.GetResponse();\r\n&nbsp;&nbsp;StreamReader&nbsp;reader&nbsp;=&nbsp;new&nbsp;StreamReader(myResponse.GetResponseStream(),&nbsp;Encoding.UTF8);\r\n&nbsp;&nbsp;string&nbsp;content&nbsp;=&nbsp;reader.ReadToEnd();\r\n&nbsp;&nbsp;reader.Close();\r\n\r\n&nbsp;&nbsp;\/\/\u4f7f\u7528\u524d\u9700\u8981\u5f15\u7528Newtonsoft.json.dll\u6587\u4ef6\r\n&nbsp;&nbsp;JObject&nbsp;jsonObj&nbsp;=&nbsp;JObject.Parse(content);\r\n\r\n&nbsp;\u3000\u3000\u3000\u3000\u3000\u3000&nbsp;\/\/\u5047\u5982\u5907\u6ce8\u540d\u4e0d\u4e3a\u7a7a\uff0c\u7ed9\u5907\u6ce8\u540d\u6587\u672c\u6846\u8d4b\u503c\uff0c\u663e\u793a\u539f\u6709\u7684\u5907\u6ce8\u540d\r\n&nbsp;&nbsp;if&nbsp;(!String.IsNullOrWhiteSpace(jsonObj[\"remark\"].ToString()))\r\n&nbsp;&nbsp;{\r\n&nbsp;&nbsp;&nbsp;this.txtRemarkName.Value&nbsp;=&nbsp;jsonObj[\"remark\"].ToString();\r\n&nbsp;&nbsp;}\r\n\r\n&nbsp;&nbsp;}\r\n&nbsp;}\r\n&nbsp;\/\/\/&nbsp;&lt;summary&gt;\r\n&nbsp;\/\/\/&nbsp;\u8bbe\u7f6e\u5907\u6ce8\u540d\r\n&nbsp;\/\/\/&nbsp;&lt;\/summary&gt;\r\n&nbsp;\/\/\/&nbsp;&lt;param&gt;\r\n&nbsp;\/\/\/&nbsp;&lt;param&gt;\r\n&nbsp;protected&nbsp;void&nbsp;LinkBtnSet_Click(object&nbsp;sender,&nbsp;EventArgs&nbsp;e)\r\n&nbsp;{\r\n&nbsp;&nbsp;\r\n\r\n&nbsp;&nbsp;String&nbsp;openid&nbsp;=&nbsp;Request.QueryString[\"id\"].ToString();\r\n\r\n&nbsp;&nbsp;WeiXinServer&nbsp;wxs&nbsp;=&nbsp;new&nbsp;WeiXinServer();\r\n&nbsp;&nbsp;string&nbsp;res&nbsp;=&nbsp;\"\";\r\n\r\n&nbsp;&nbsp;\/\/\/\u4ece\u7f13\u5b58\u8bfb\u53d6accesstoken\r\n&nbsp;&nbsp;string&nbsp;Access_token&nbsp;=&nbsp;Cache[\"Access_token\"]&nbsp;as&nbsp;string;\r\n\r\n&nbsp;&nbsp;if&nbsp;(Access_token&nbsp;==&nbsp;null)\r\n&nbsp;&nbsp;{\r\n&nbsp;&nbsp;\/\/\u5982\u679c\u4e3a\u7a7a\uff0c\u91cd\u65b0\u83b7\u53d6\r\n&nbsp;&nbsp;Access_token&nbsp;=&nbsp;wxs.GetAccessToken();\r\n\r\n&nbsp;&nbsp;\/\/\u8bbe\u7f6e\u7f13\u5b58\u7684\u6570\u636e7000\u79d2\u540e\u8fc7\u671f\r\n&nbsp;&nbsp;Cache.Insert(\"Access_token\",&nbsp;Access_token,&nbsp;null,&nbsp;DateTime.Now.AddSeconds(7000),&nbsp;System.Web.Caching.Cache.NoSlidingExpiration);\r\n&nbsp;&nbsp;}\r\n\r\n&nbsp;&nbsp;string&nbsp;Access_tokento&nbsp;=&nbsp;Access_token.Substring(17,&nbsp;Access_token.Length&nbsp;-&nbsp;37);\r\n\r\n\r\n&nbsp;&nbsp;string&nbsp;posturl&nbsp;=&nbsp;\"https:\/\/api.weixin.qq.com\/cgi-bin\/user\/info\/updateremark?access_token=\"&nbsp;+&nbsp;Access_tokento;\r\n\r\n&nbsp;&nbsp;string&nbsp;postData&nbsp;=&nbsp;\"{\"openid\":\"\"&nbsp;+&nbsp;openid.ToString().Trim()&nbsp;+&nbsp;\"\",\"remark\":\"\"&nbsp;+&nbsp;this.txtRemarkName.Value.ToString()&nbsp;+&nbsp;\"\"}\";\r\n\r\n\r\n&nbsp;&nbsp;res&nbsp;=&nbsp;wxs.GetPage(posturl,&nbsp;postData);\r\n\r\n\r\n&nbsp;&nbsp;\/\/\u4f7f\u7528\u524d\u9700\u836f\u5f15\u7528Newtonsoft.json.dll\u6587\u4ef6\r\n&nbsp;&nbsp;JObject&nbsp;jsonObj&nbsp;=&nbsp;JObject.Parse(res);\r\n\r\n&nbsp;&nbsp;\/\/\/\u83b7\u53d6\u8fd4\u56de\u7ed3\u679c\u7684\u6b63\u786e|true|false,\r\n&nbsp;&nbsp;string&nbsp;isright&nbsp;=&nbsp;jsonObj[\"errcode\"].ToString();\/\/0\r\n&nbsp;&nbsp;string&nbsp;istrueorfalse&nbsp;=&nbsp;jsonObj[\"errmsg\"].ToString();\/\/ok\r\n&nbsp;&nbsp;if&nbsp;(isright.Equals(\"0\")&nbsp;&amp;amp;&amp;amp;&nbsp;istrueorfalse.Equals(\"ok\"))\r\n&nbsp;&nbsp;{\r\n&nbsp;&nbsp;ScriptManager.RegisterClientScriptBlock(this.Page,&nbsp;this.GetType(),&nbsp;\"\",&nbsp;\"alert('\u4fee\u6539\u5907\u6ce8\u6210\u529f\uff01');location='WeiXinUserList.aspx';\",&nbsp;true);\r\n&nbsp;&nbsp;}\r\n&nbsp;&nbsp;else\r\n&nbsp;&nbsp;{\r\n&nbsp;&nbsp;ScriptManager.RegisterClientScriptBlock(this.Page,&nbsp;this.GetType(),&nbsp;\"\",&nbsp;\"alert('\u4fee\u6539\u5907\u6ce8\u5931\u8d25\uff01');\",&nbsp;true);\r\n&nbsp;&nbsp;}\r\n\r\n&nbsp;}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u4ee5\u4e0a\u5c31\u662fasp.net\u5fae\u4fe1\u5f00\u53d1\u5df2\u5173\u6ce8\u7528\u6237\u7ba1\u7406\u6b65\u9aa4\u8be6\u89e3\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8fd9\u7bc7\u6587\u7ae0\u4e3b\u8981\u4ecb\u7ecd\u4e86asp.net\u5fae\u4fe1\u5f00\u53d1\u4e2d\u6709\u5173\u5df2\u5173\u6ce8\u7684\u76f8\u5173\u5185\u5bb9\uff0c\u9700\u8981\u7684\u670b\u53cb\u53ef\u4ee5\u53c2\u8003\u4e0b \u516c\u4f17\u53f7\u53ef\u901a\u8fc7\u672c\u6765\u83b7\u53d6\u5e10\u53f7\u7684\u5173\u6ce8\u8005\u5217\u8868\uff0c\u5173\u6ce8\u8005\u5217\u8868\u7531\u4e00\u4e32OpenID\uff08\u52a0\u5bc6\u540e\u7684\u5fae\u4fe1\u53f7\uff0c\u6bcf\u4e2a\u7528\u6237\u5bf9\u6bcf\u4e2a\u516c\u4f17\u53f7\u7684OpenID\u662f\u552f\u4e00\u7684\uff09\u7ec4\u6210\u3002\u4e00\u6b21\u62c9\u53d6\u8c03\u7528\u6700\u591a\u62c9\u53d610000\u4e2a\u5173\u6ce8\u8005\u7684OpenID\uff0c\u53ef\u4ee5\u901a\u8fc7\u591a\u6b21\u62c9\u53d6\u7684\u65b9\u5f0f\u6765\u6ee1\u8db3\u9700\u6c42\u3002 \u63a5\u53e3\u8c03\u7528\u8bf7\u6c42\u8bf4\u660e http\u8bf7\u6c42\u65b9\u5f0f: GET\uff08\u8bf7\u4f7f\u7528https\u534f\u8bae\uff09 \u8fd4\u56de\u8bf4\u660e \u6b63\u786e\u65f6\u8fd4\u56de\u6570\u636e\u5305\uff1a \u9519\u8bef\u65f6\u8fd4\u56deJSON\u6570\u636e\u5305\uff08\u793a\u4f8b\u4e3a\u65e0\u6548AppID\u9519\u8bef\uff09\uff1a {&#8220;errcode&#8221;:40013,&#8221;errmsg&#8221;:&#8221;invalid appid&#8221;}\u9644\uff1a\u5173\u6ce8\u8005\u6570\u91cf\u8d85\u8fc710000\u65f6 \u5f53\u516c\u4f17\u53f7\u5173\u6ce8\u8005\u6570\u91cf\u8d85\u8fc710000\u65f6\uff0c\u53ef\u901a\u8fc7\u586b\u5199_openid\u7684\u503c\uff0c\u4ece\u800c\u591a\u6b21\u62c9\u53d6\u5217\u8868\u7684\u65b9\u5f0f\u6765\u6ee1\u8db3\u9700\u6c42\u3002 \u5177\u4f53\u800c\u8a00\uff0c\u5c31\u662f\u5728\u8c03\u7528\u63a5\u53e3\u65f6\uff0c\u5c06\u4e0a\u4e00\u6b21\u8c03\u7528\u5f97\u5230\u7684\u8fd4\u56de\u4e2d\u7684next_openid\u503c\uff0c\u4f5c\u4e3a\u4e0b\u4e00\u6b21\u8c03\u7528\u4e2d\u7684next_openid\u503c\u3002 \u793a\u4f8b\u5982\u4e0b\uff1a \u516c\u4f17\u8d26\u53f7A\u62e5\u670923000\u4e2a\u5173\u6ce8\u7684\u4eba\uff0c\u60f3\u901a\u8fc7\u62c9\u53d6\u5173\u6ce8\u63a5\u53e3\u83b7\u53d6\u6240\u6709\u5173\u6ce8\u7684\u4eba\uff0c\u90a3\u4e48\u5206\u522b\u8bf7\u6c42url\u5982\u4e0b\uff1ahttps:\/\/api.weixin.qq.com\/cgi-bin\/user\/get?access_token=ACCESS_TOKEN \u8fd4\u56de\u7ed3\u679c: { &nbsp;&#8220;total&#8221;:23000, &nbsp;&#8220;count&#8221;:10000, &nbsp;&#8220;data&#8221;:{&#8221; &nbsp;openid&#8221;:[ &nbsp;&#8220;OPENID1&#8221;, &nbsp;&#8220;OPENID2&#8221;, &nbsp;&#8230;, &nbsp;&#8220;OPENID10000&#8221; &nbsp;] &nbsp;}, &nbsp;&#8220;next_openid&#8221;:&#8221;OPENID10000&#8243; } \u767b\u5f55\u540e\u590d\u5236 https:\/\/api.weixin.qq.com\/cgi-bin\/user\/get?access_token=ACCESS_TOKEN&amp;next_openid=NEXT_OPENID1\u8fd4\u56de\u7ed3\u679c: { &nbsp;&#8220;total&#8221;:23000, &nbsp;&#8220;count&#8221;:10000, &nbsp;&#8220;data&#8221;:{ &nbsp;&#8220;openid&#8221;:[ &nbsp;&#8220;OPENID10001&#8221;, &nbsp;&#8220;OPENID10002&#8221;, &nbsp;&#8230;, &nbsp;&#8220;OPENID20000&#8221; &nbsp;] &nbsp;}, &nbsp;&#8220;next_openid&#8221;:&#8221;OPENID20000&#8243; } \u767b\u5f55\u540e\u590d\u5236 https:\/\/api.weixin.qq.com\/cgi-bin\/user\/get?access_token=ACCESS_TOKEN&amp;next_openid=NEXT_OPENID2\u8fd4\u56de\u7ed3\u679c\uff08\u5173\u6ce8\u8005\u5217\u8868\u5df2\u8fd4\u56de\u5b8c\u65f6\uff0c\u8fd4\u56denext_openid\u4e3a\u7a7a\uff09: { &nbsp;&#8220;total&#8221;:23000, &nbsp;&#8220;count&#8221;:3000, &nbsp;&#8220;data&#8221;:{&#8221; &nbsp;&#8220;openid&#8221;:[ &nbsp;&nbsp;&#8220;OPENID20001&#8221;, &nbsp;&nbsp;&#8220;OPENID20002&#8221;, &nbsp;&nbsp;&#8230;, &nbsp;&nbsp;&#8220;OPENID23000&#8221; &nbsp;] [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[],"class_list":["post-29181","post","type-post","status-publish","format-standard","hentry","category-19"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/29181","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=29181"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/29181\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=29181"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=29181"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=29181"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}