C# 后台模拟请求一般处理程序
WebClient webClient = new WebClient();
NameValueCollection formData = new NameValueCollection();
//输出值
formData["type"] = "webService_InsertSBKSCRKBD";
formData["SBKSCRKB"] = SBKSCRKB;
//页面地址 地址加域名
string posturl = "http://" + HttpContext.Current.Request.Url.Authority+ "/PTHC/data/PTHCSY_data.ashx";
//读取地址并进入一般处理程序
byte[] responseBytes = webClient.UploadValues(posturl, "POST", formData);
//接收返回值
string responsefromserver = Encoding.UTF8.GetString(responseBytes);
webClient.Dispose();
return responsefromserver;
posted on
2017-11-09 20:37
Apex_233 阅读(
...) 评论(
...)
编辑
收藏