stati WebClient() public WebClient()
WebClient wc = new WebClient();
StringBuilder postData = new StringBuilder();
postData.Append("formField1=" + "表单数据一");
postData.Append("&formField2=" + "表单数据二");
postData.Append("&formField3=" + "表单数据三");
//下面是GB2312编码
byte[] sendData = Encoding.GetEncoding("GB2312").GetBytes(postData.ToString());
wc.Headers.Add("Content-Type", "application/x-www-form-urlencoded");
wc.Headers.Add("ContentLength", sendData.Length.ToString());
byte[] recData= wc.UploadData("http://www.domain.cn/services/DataImport1.asp","POST",sendData);
//显示返回值注意编码
MessageBox.Show(Encoding.GetEncoding("GB2312").GetString(recData));
postData.Append("formField1=" + HttpUtility.UrlEncode("表单数据一",Encoding.GetEncoding("GB2312")));
postData.Append("&formField2=" + HttpUtility.UrlEncode("表单数据二",Encoding.GetEncoding("GB2312")));
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有