using System; |
using System.Data; |
using System.Configuration; |
using System.Collections; |
using System.IO; |
using System.Net; |
using System.Text; |
using System.Web; |
using System.Web.Security; |
using System.Web.UI; |
using System.Web.UI.WebControls; |
using System.Web.UI.WebControls.WebParts; |
using System.Web.UI.HtmlControls; |
using System.Security.Cryptography.X509Certificates; |
using System.Net.Security; |
public partial class Post : System.Web.UI.Page |
{ |
public static string PostUrl = ConfigurationManager.AppSettings[ "WebReference.Service.PostUrl" ]; |
protected void Page_Load( object sender, EventArgs e) |
{ |
} |
protected void ButSubmit_Click( object sender, EventArgs e) |
{ |
string un = this .Txtaccount.Text.Trim(); |
string pw = this .Txtpassword.Text.Trim(); |
string phone = this .Txtmobile.Text.Trim(); |
string content = "【云通讯】" + HttpContext.Current.Server.UrlEncode( this .Txtcontent.Text.Trim()); |
string postJsonTpl = ""account":"{0}","password":"{1}","phone":"{2}","report":"false","msg":"{3}"" ; |
string jsonBody = string .Format(postJsonTpl, un, pw, phone, content); |
string result = doPostMethodToObj( "http://xxx/msg/send/json" , "{" + jsonBody + "}" );//请求地址请登录云通讯平台查看或者询问您的商务负责人获取 |
LabelRetMsg.Text = result; |
} |
public static string
|