The example of this article for everyone to share the ASP.net micro-letter user group management of the specific code for your reference, the specific contents are as follows
Model Layer Entity class:
public class UserList
{public
string total {get; set;}
public string Count {get; set;}
Public Userlistopenid data {get; set;}
public string Next_openid {get; set;}
}
public class Userlistopenid
{public
list<string> OpenID {get; set;}
}
public class Wxgroupsinfo
{public
string group_id {get; set;} Group numbering public
string Group_name {get; set;} Group name Public
string Group_count {get; set;} Group number
}
Wx.aspx content:
<%@ Page language= "C #" autoeventwireup= true "codebehind=" WX.aspx.cs "inherits=" test. WX "%> <! DOCTYPE html> <html xmlns= "http://www.w3.org/1999/xhtml" > <head runat= "Server" > <meta http-equiv= " Content-type "content=" text/html;
Charset=utf-8 "/> <style type= text/css" > Inputstyle {height:35px;
line-height:35px;
text-indent:5px;
width:350px;
Background-image:url (' images/inputbg.gif ');
Background-repeat:repeat-x;
Border-top:solid 1px #a7b5bc;
Border-left:solid 1px #a7b5bc;
Border-right:solid 1px #ced9df;
Border-bottom:solid 1px #ced9df;
margin:15px Auto 15px Auto;
}. g_title {width:100%;
border-bottom:2px solid #ced9df;
font-size:20px;
Font-weight:bold;
Text-align:left;
text-indent:5px;
height:40px;
line-height:40px;
} th {height:35px;
Background-color: #31bb34;
Background-repeat:repeat-x;
TR {height:30px;}
#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;
} #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;
}. closelogin {height:30px;
border-bottom:2px solid #31bb34;
Text-align:right;
line-height:30px;
font-size:14px;
Font-weight:bold;
} a:hover {Cursor:pointer}
. inputstyle22 {height:35px;
line-height:35px;
text-indent:5px;
width:280px;
Background-image:url (' images/inputbg.gif ');
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;
} </style> <style type= "text/css" > button {font:15px Calibri, Arial, Sans-serif; text-shadow:1px 1px 0 RGBA (255, 255, 255, 0.4);
Text-decoration:none!important;
White-space:nowrap;
Display:inline-block;
Vertical-align:baseline;
position:relative;
Cursor:pointer;
PADDING:4PX 20px;
Background-repeat:no-repeat;
Background-position:bottom left;
Background-image:url (' button_bg.png ');
Background-position:bottom left, top right, 0 0, 0 0;
Background-clip:border-box;
-moz-border-radius:8px;
-webkit-border-radius:8px;
border-radius:8px;
-moz-box-shadow:0 0 1px #fff inset;
-webkit-box-shadow:0 0 1px #fff inset;
box-shadow:0 0 1px #fff inset;
-webkit-transition:background-position 1s;
-moz-transition:background-position 1s;
Transition:background-position 1s;
}. Blue.button {color: #0f4b6d!important;
border:1px solid #84acc3!important;
Background-color: #48b5f2; Background-image:url (' button_bg.png '), url (' button_bg.png '),-moz-radial-gradient (center bottom, Circle, Rgba (89, 244, 1) 0, Rgba (244, 0) 100px),-moz-Linear-gradient (#4fbbf7, #3faeeb);
Background-image:url (' button_bg.png '), url (' button_bg.png '),-webkit-gradient (radial, 50% 100%, 0, 50% 100%, 100, From (RGBA, 244, 1), to (RGBA, 244, 0)),-webkit-gradient (linear, 0% 0, 0% 100%, from (#4fbbf7), to (#3f
Aeeb));
}. blue.button:hover {background-color: #63c7fe; Background-image:url (' button_bg.png '), url (' button_bg.png '),-moz-radial-gradient (center bottom, Circle, Rgba (109,
217, 1) 0, RGBA (109, 217, 0) 100px),-moz-linear-gradient (#63c7fe, #58bef7);
Background-image:url (' button_bg.png '), url (' button_bg.png '),-webkit-gradient (radial, 50% 100%, 0, 50% 100%, 100, From (RGBA (109, 217, 1)), to (RGBA (109, 217, 0)),-webkit-gradient (linear, 0% 0, 0% 100%, from (#63c7fe), to (#
58BEF7));
} </style> <script src= "js/jquery-1.11.2.min.js" ></script> <script type= "Text/javascript" > Modifies function functions Editroster (Payno, name) {//alert for Group name calls (Payno+ ":" +name); var url = ' edit.aspx?id= ' + payno + ' &name= ' + name;
Turn to the address of the Web page; var name = ' Add ';
The name of the Web page may be empty; var iwidth = 600;
The width of the pop-up window; var iheight = 300;
The height of the pop-up window;
Gets the vertical position of the window var itop = (window.screen.availheight-30-iheight)/2;
Gets the horizontal position of the window var ileft = (window.screen.availwidth-10-iwidth)/2; window.open (URL, name, ' height= ' + iheight + ', innerheight= ' + iheight + ', width= ' + iwidth + ', innerwidth= ' + iwidth + ', Top= ' + itop + ', left= ' + ILeft + ', Status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=0,titlebar=no '
);
$ (document). Ready (function () {$ (". Newgroups"). Click (function () {$ ("#shownewgroupzhezhaoceng"). Show ();
$ ("#shownewgroup"). Show ();
}), $ ('. Closeloginpage '). Click (function () {$ ("#shownewgroupzhezhaoceng"). Hide ();
$ ("#shownewgroup"). Hide ();
});
}); </script> </head> <body> <form id= "Form1" runat= "Server" > <div class= "g_title" > Group Management < /div> <div id= "Shownewgroup"; <div class= "Closelogin" > <span style= "Float:left"; Color: #08a5e0; font-size:18px; text-indent:5px; " > New group </span> <a class= "closeloginpage button Blue" > off </a> </div> <div style= "font -size:12px; height:40px; color:red; line-height:40px; " > within 30 characters </div> <input type= "text" id= "Txtgroupsname" name= "Txtgroupsname" class= "Inputstyle22" maxlength = "runat=" server "value=" group name "onfocus=" if (value==defaultvalue) {value= '; this.style.color= ' #000 '} ' onblur= ' if (! Value) {value=defaultvalue;this.style.color= ' #999 '} "style=" color: #999 "/> <asp:linkbutton id=" Linkbtncreategroup "runat=" Server "onclick=" Linkbtncreategroup_click "> <div style=" Background-image:url (' Images/buttonbg.png '); width:111px; height:35px; line-height:35px; Font-weight:bold; Float:left; margin-top:20px; margin-left:5px; Text-align:center; Color: #fff; > OK create </div> </asp:LinkButton> </div> <div id= "shOwnewgroupzhezhaoceng "></div> <table style=" WIDTH:1124PX; margin:10px Auto 10px Auto; border:1px solid #ecd9df; Text-align:center; " > <asp:repeater id= "repeatergrouplist" runat= "Server" onitemcommand= "Repeatergrouplist_itemcommand" onitemdatabound= "Repeatergrouplist_itemdatabound" > <HeaderTemplate> <tr> <th> serial number </th> &L
T;th>id number </th> <th> Group name </th> <th> Group number </th> <th> operation </th> </tr> </HeaderTemplate> <ItemTemplate> <tr style= ' Background-color: <%# (container.itemindex%2 = 0)? "#fff": "#ced9ff"%> ' > <td><asp:label id= "Lbxuhao" runat= "Server" text= "" ></asp:label></ Td> <td><%# eval ("group_id")%></td> <td><%# eval ("group_name")%></td> <t d><%# Eval ("Group_count")%></td> <td> <a class= "button blue" onclick= "Editroster (' <%# Eva L ("group_id")%> ', ' <%# Eval ("group_name")%> '); "> Modify group name </a> <asp:linkbutton id=" Linkbtndeletegroup "runat=" Server "Commandname=" Deletegroups " Commandargument= ' <%# Eval ("group_id")%> ' cssclass= button Blue ' > Delete group </asp:LinkButton> <asp: LinkButton id= "Linkbtnsendbygroup" runat= "Server" Commandname= "sendbygroups" commandargument= "<%#" Eval ("group_id ")%> ' cssclass= button Blue" > Group message Mass </asp:LinkButton> <asp:linkbutton id= "Linkbtnmoveusertogroup" runat= "Server" Commandname= "Moveusertogroup" commandargument= ' <%# Eval ("group_id")%> ' cssclass= ' button blue '
> Mobile Group </asp:LinkButton> </td> </tr> </ItemTemplate> </asp:Repeater> </table> <a class= "newgroups" ><div style= "Background-image:url" (' images/buttonbg.png '); width:111px; height:35px; line-height:35px; margin:10px Auto 10px 28px; Font-weight:bold; Float:left; Text-align:center; Color: #fff; > ┼ New Group </DIV></A>
</form> </body> </html>
WX.aspx.cs Code:
Public partial class WX:System.Web.UI.Page {protected void Page_Load (object sender, EventArgs e) {bindgrouplist ()
; This.
DataBind ();
private void Bindgrouplist () {weixinserver wxs = new Weixinserver ();
Read Accesstoken string access_token = cache["Access_token" as string from cache; if (Access_token = null) {//if empty, retrieve Access_token = Wxs.
Getaccesstoken ();
Set cached data 7,000 seconds after expiration Cache.Insert ("Access_token", Access_token, NULL, DateTime.Now.AddSeconds (7000),
System.Web.Caching.Cache.NoSlidingExpiration); String access_tokento = Access_token. Substring, Access_token.
LENGTH-37);
String jsonres = "";
String content = cache["Allgroups_content"] as String;
if (content = = null) {jsonres = "https://api.weixin.qq.com/cgi-bin/groups/get?access_token=" + access_tokento;
HttpWebRequest myrequest = (HttpWebRequest) webrequest.create (jsonres);
Myrequest.method = "Get";
HttpWebResponse myresponse = (HttpWebResponse) myrequest.getresponse (); StreamReader ReadeR = new StreamReader (Myresponse.getresponsestream (), Encoding.UTF8); Content = Reader.
ReadToEnd (); Reader.
Close ();
Set cached data 7,000 seconds after expiration Cache.Insert ("Allgroups_content", content, NULL, DateTime.Now.AddSeconds (7000),
System.Web.Caching.Cache.NoSlidingExpiration);
Newtonsoft.json file Jobject jsonobj = jobject.parse (content) should be referenced before use. int groupsnum = jsonobj["groups"].
Count ();
list<wxgroupsinfo> wxgrouplist = new list<wxgroupsinfo> ();
for (int i = 0; i < Groupsnum i++) {wxgroupsinfo wginfo = new Wxgroupsinfo (); Wginfo. group_id = jsonobj["groups"][i]["ID".
ToString (); Wginfo. Group_name = jsonobj["groups"][i]["Name".
ToString (); Wginfo. Group_count = jsonobj["groups"][i]["Count"].
ToString (); Wxgrouplist.
ADD (Wginfo); } this.
Repeatergrouplist.datasource = wxgrouplist; This.
Repeatergrouplist.databind (); ///<summary>///Binding events///</summary>///<param name= "sender" ></param>///<param Nam
E= "E" ></param> protected void Repeatergrouplist_itemdatabound (object sender, RepeaterItemEventArgs e) {if (E.item.itemtype = = Listite Mtype.item | |
E.item.itemtype = = ListItemType.AlternatingItem) {Label Lbxuhao = E.item.findcontrol ("Lbxuhao") as label;
int num = 1; Lbxuhao.text = num.
ToString (); for (int i = 0; I < this. RepeaterGroupList.Items.Count;
i++) {num = 1; Lbxuhao.text = num.
ToString ();
} LinkButton Linkbtndeletegroup = E.item.findcontrol ("Linkbtndeletegroup") as LinkButton;
LinkButton Linkbtnsendbygroup = E.item.findcontrol ("Linkbtnsendbygroup") as LinkButton; LINKBTNDELETEGROUP.ATTRIBUTES.ADD ("OnClick", "Return confirm" (' Are you sure you want to delete this group?) After deletion, the people within this group are about to revert to the default group!
')"); LINKBTNDELETEGROUP.ATTRIBUTES.ADD ("OnClick", "Return confirm" (' Are you sure you want to mass message to this group?)
')"); }///<summary>///execution Event///</summary>///<param name= "source" ></param>///<param N Ame= "E" ></param> protected void Repeatergrouplist_itemcommand (object source, RepeatercommandeveNtargs e) {if (E.commandname = = "Deletegroups") {weixinserver Wxs = new Weixinserver ();
string res = "";
Read Accesstoken string access_token = cache["Access_token" as string from cache; if (Access_token = null) {//if empty, retrieve Access_token = Wxs.
Getaccesstoken ();
Set cached data 7,000 seconds after expiration Cache.Insert ("Access_token", Access_token, NULL, DateTime.Now.AddSeconds (7000),
System.Web.Caching.Cache.NoSlidingExpiration); String access_tokento = Access_token. Substring, Access_token.
LENGTH-37);
String posturl = "https://api.weixin.qq.com/cgi-bin/groups/delete?access_token=" + access_tokento;
Post Data example: Post Data example: {"group": {"id": 108}} String GroupID = E.commandargument.tostring ();
String postdata = "{\ Group\": {\ "id\": \ "+ GroupID +" \ "}}"; res = Wxs.
GetPage (PostURL, postdata); Scriptmanager.registerclientscriptblock (this. Page, this. GetType (), "", "alert (' Delete succeeded! Because of the caching problem, you may need to log on again to see the effect!
'); location= ' wxgroupmanagelist.aspx '; ", true); } if (E.commandname = = "SendbyGroups ") {weixinserver Wxs = new Weixinserver ();
string res = "";
Read Accesstoken string access_token = cache["Access_token" as string from cache; if (Access_token = null) {//if empty, retrieve Access_token = Wxs.
Getaccesstoken ();
Set cached data 7,000 seconds after expiration Cache.Insert ("Access_token", Access_token, NULL, DateTime.Now.AddSeconds (7000),
System.Web.Caching.Cache.NoSlidingExpiration); String access_tokento = Access_token. Substring, Access_token.
LENGTH-37);
String posturl = "https://api.weixin.qq.com/cgi-bin/message/mass/sendall?access_token=" + access_tokento;
String groupid = E.commandargument.tostring (); String postdata = "{\ Group\": {\ "id\": \ "" + GroupID.
ToString () + "\"}};
Jobject postdata = new Jobject ();
Jobject filter = new Jobject (); Filter.
ADD ("Is_to_all", false); Filter.
ADD ("group_id", GroupID);
Jobject Text = new Jobject (); Text. ADD ("Content", "Test contents!")
");
Postdata.add ("filter", filter);
Postdata.add ("text", text); Postdata.add ("Msgtype", "TexT "); res = Wxs.
GetPage (PostURL, postdata.tostring ()); Scriptmanager.registerclientscriptblock (this. Page, this. GetType (), "", "alert (' Mass success! Because of the caching problem, you may need to log on again to see the effect!
'); location= ' wxgroupmanagelist.aspx '; ", true);
} if (E.commandname = = "Moveusertogroup") {weixinserver Wxs = new Weixinserver ();
string res = "";
String access_token = cache["Access_token"] as String; if (Access_token = = null) {Access_token = Wxs.
Getaccesstoken (); Cache.Insert ("Access_token", Access_token, NULL, DateTime.Now.AddSeconds (7000),
System.Web.Caching.Cache.NoSlidingExpiration); String access_tokento = Access_token. Substring, Access_token.
LENGTH-37);
String posturl = "https://api.weixin.qq.com/cgi-bin/groups/members/update?access_token=" + access_tokento; String userlisturl = "https://api.weixin.qq.com/cgi-bin/user/get?access_token=" + Access_tokento + "&next_openid=
"; {"Total": 2, "Count": 2, "data": {"OpenID": ["", "OPENID1", "OPENID2"]}, "Next_openid": "Next_openid"} res = Wxs. GetPage (Userlisturl, "");
UserList userlist= jsonconvert.deserializeobject<userlist> (res);
String Openid=userlist.data.openid.firstordefault ();
int togroup_id = 101;//input Group ID string postdata = "{\" openid\ ": \" "+ OpenID +" \, \ "to_groupid\": "+ togroup_id +"} "; res = Wxs.
GetPage (PostURL, postdata); Scriptmanager.registerclientscriptblock (this. Page, this. GetType (), "", "alert (' Move Group succeeded! Because of the caching problem, you may need to log on again to see the effect!
'); location= ' wxgroupmanagelist.aspx '; ", true); }///<summary>///create group///</summary>///<param name= "sender" ></param>///<param N Ame= "E" ></param> protected void Linkbtncreategroup_click (object sender, EventArgs e) {if (this.txtgroupsname. Value.equals ("group name")) {////Scriptmanager.registerclientscriptblock (this. Page, this. GetType (), "", "alert (' cannot be empty!
') ', true);
This.txtgroupsName.Focus ();
Return
} weixinserver Wxs = new Weixinserver ();
string res = ""; Reading from cache Accesstoken string access_token = cache["access_tOken "] As String; if (Access_token = null) {//if empty, retrieve Access_token = Wxs.
Getaccesstoken ();
Set cached data 7,000 seconds after expiration Cache.Insert ("Access_token", Access_token, NULL, DateTime.Now.AddSeconds (7000),
System.Web.Caching.Cache.NoSlidingExpiration); String access_tokento = Access_token. Substring, Access_token.
LENGTH-37);
String posturl = "https://api.weixin.qq.com/cgi-bin/groups/create?access_token=" + access_tokento; String postdata = "{\ Group\": {\ "name\": \ "" + this.txtgroupsName.Value.ToString ().
Trim () + "\"}}; res = Wxs.
GetPage (PostURL, postdata); Scriptmanager.registerclientscriptblock (this. Page, this. GetType (), "", "alert (' Create success! If it is not displayed, please exit and login again!
'); location= ' wxgroupmanagelist.aspx '; ", true);
}
}
WeiXinServer.cs Code:
<summary>///Service class///</summary> public class Weixinserver {///<summary>///get pass///& lt;/summary>///<returns></returns> public string Getaccesstoken () {String url_token = "Https://api. weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=wx3eb5bf1290db2ca0&secret=
e6013be0a7338c7d3e02877db116e231 ";
HttpWebRequest myrequest = (HttpWebRequest) webrequest.create (Url_token);
Myrequest.method = "Get";
HttpWebResponse myresponse = (HttpWebResponse) myrequest.getresponse ();
StreamReader reader = new StreamReader (Myresponse.getresponsestream (), Encoding.UTF8); String content = Reader.
ReadToEnd (); Reader.
Close ();
return content;
public string GetPage (string p, string postdata) {Stream outstream = null;
Stream instream = null;
StreamReader sr = null;
HttpWebResponse response = null;
HttpWebRequest request = null;
Encoding Encoding = Encoding.UTF8; byte[] data = encoding.
GetBytes (PostData); Prepare the request..
try {//Set parameter request = WebRequest.Create (p) as HttpWebRequest;
Cookiecontainer Cookiecontainer = new Cookiecontainer (); Request.
Cookiecontainer = Cookiecontainer; Request.
AllowAutoRedirect = true; Request.
method = "POST"; Request.
ContentType = "application/x-www-form-urlencoded"; Request. ContentLength = data.
Length; OutStream = Request.
GetRequestStream (); OutStream. Write (data, 0, data.
Length); OutStream.
Close (); Send request and get corresponding response data response = Request.
GetResponse () as HttpWebResponse; Until request. The GetResponse () program only starts sending post requests to the target Web page instream = response.
GetResponseStream ();
sr = new StreamReader (instream, encoding); Returns the resulting web page (HTML) code string content = Sr.
ReadToEnd (); string err = string.
Empty;
return content; The catch (Exception ex) {string err = ex.
message; return string.
Empty;
}
}
}
Edit.aspx content:
<%@ Page language= "C #" autoeventwireup= true "codebehind=" Edit.aspx.cs "inherits=" test. Edit "%> <html > <head runat=" Server "> <meta http-equiv=" content-type "content=" text/html;
Charset=utf-8 "/> <title></title> <style type=" Text/css ">. inputstyle {height:35px;
line-height:35px;
text-indent:5px;
width:280px;
Background-image:url (' images/inputbg.gif ');
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; } </style> </head> <body> <form id= "Form1" runat= "Server" > <table border= "1" style= "width : 500px; Border-collapse:collapse; margin:20px Auto 20px Auto; line-height:40px; " > <tr> <td style= "text-align:right;" > Group number:</td> <td> <asp:textbox id= "txtgroupid" cssclass= "Inputstyle" enabled= "false" runat= "Server" ></asp:TextBox></td> </tr> <tr> <td style= "text-align:right;" > Group name:</td> <td> <asp:textbox id= "Txtgroupname" cssclass= "Inputstyle" runat= "Server" ></asp: textbox> </td> </tr> <tr> <td></td> <td> <asp:linkbutton id= "Linkbtnse T "runat=" server "onclick=" Linkbtnset_click "><div style=" Background-image:url (' images/buttonbg.png '); width:111px; height:35px; line-height:35px; Float:left; Font-weight:bold; Text-align:center; Color: #fff; > Set </div></asp:LinkButton></td> </tr> </table> </form> </
Body> </html>
Edit.aspx.cs Code:
Public partial class Edit:System.Web.UI.Page {protected void Page_Load (object sender, EventArgs e) {if (!) Page.IsPostBack) {if (request.querystring["id"]!= null) {string group_id = request.querystring["id"].
ToString (); String group_name = request.querystring["Name"].
ToString (); This.txtGroupId.Text = group_id.
ToString (); This.txtGroupName.Text = Group_name.
ToString ();
This.txtGroupName.Focus (); }}///<summary>///settings///</summary>///<param name= "sender" ></param>///<param Name= "E" ></param> protected void Linkbtnset_click (object sender, EventArgs e) {if (String.isnullorwhitespace) ( This.txtGroupName.Text.ToString (). Trim ()) {Scriptmanager.registerclientscriptblock (this. Page, this. GetType (), "", "alert (' cannot be empty!
'); ", true);
This.txtGroupName.Focus ();
Return } if (This.txtGroupName.Text.Trim (). Length > {scriptmanager.registerclientscriptblock (this.) Page, this. GetType (), "", "alert (' group name should be within 30 characters!) '; ", true);
This.txtGroupName.Focus ();
Return
} weixinserver Wxs = new Weixinserver ();
string res = "";
Read Accesstoken string access_token = cache["Access_token" as string from cache; if (Access_token = null) {//if empty, retrieve Access_token = Wxs.
Getaccesstoken ();
Set cached data 7,000 seconds after expiration Cache.Insert ("Access_token", Access_token, NULL, DateTime.Now.AddSeconds (7000),
System.Web.Caching.Cache.NoSlidingExpiration); String access_tokento = Access_token. Substring, Access_token.
LENGTH-37);
String posturl = "https://api.weixin.qq.com/cgi-bin/groups/update?access_token=" + access_tokento; Post Data example: Post Data example: {"group": {"id": 108, "name": "Test2_modify2"} string postdata = "{\ Group\": {\ "id\": \ "" +
Txtgroupid.text + "\", \ "name\": \ "+ This.txtGroupName.Text +" \ "}}"; res = Wxs.
GetPage (PostURL, postdata);
Use Newtonsoft.json jobject jsonobj = Jobject.parse (res); Gets the correct |true|false that returns the result, string isright = jsonobj["Errcode"]. ToString (); 0 string istrueorfalse = jsonobj["ErrMsg "]. ToString (); Ok if (isright. Equals ("0") && istrueorfalse. Equals ("OK")) {//After successful modification, refresh the parent form and close this page scriptmanager.registerclientscriptblock. Page, this. GetType (), "", "alert (' Modify success! If not properly displayed, is a cache problem, please login again! "); window.open! [Write a picture description here]
(http://img.blog.csdn.net/20161008103126694) er.location.reload (); This.close (); ", true); else {Scriptmanager.registerclientscriptblock (this. Page, this. GetType (), "", "alert (' Modify failed!
'); This.close (); ", true;
}
}
}
Buttonbg.png
The result is as shown in figure:
This article has been sorted out to the ASP. NET micro-Credit Development tutorial Summary, you are welcome to learn to read.
The above is the entire content of this article, I hope to help you learn, but also hope that we support the cloud habitat community.