WebClient mywebclient = new WebClient();
  byte[] cheklist = mywebclient.DownloadData(severurl + "/Provider/HandlerWinForm.ashx?dept);
  string strcheck = Encoding.ASCII.GetString(cheklist);

  

   WebClient wc=new WebClient ();
           StringBuilder sb=new StringBuilder ();
           string serverip = CommonBaseInfo.CommonUtil.Cryptography.DESSecurity.Decode(ConfigurationManager.AppSettings["serverip"]);
           sb.Append("ComplaintName=" + this.textBox1.Text);
           sb.Append("&ComplaintTel=" + this.textBox2.Text);
           sb.Append("&ComplaintPost=" + this.textBox4.Text);
           sb.Append("&ComplaintAdd=" + this.textBox3.Text);
           sb.Append("&ComplaintTitle=" + this.textBox5.Text);
           sb.Append("&ComplaintRemark=" + this.textBox6.Text);
           sb.Append("&method=insertcomplaint");
            byte[] senddata=Encoding.UTF8.GetBytes(sb.ToString());
            wc.Headers.Add("Content-Type", "application/x-www-form-urlencoded");
            wc.Headers.Add("ContentLength", senddata.Length.ToString());  
            byte[] returndata= wc.UploadData(serverip+ "/Provider/HandlerWinForm.ashx", "POST", senddata);
            string strcheck = Encoding.ASCII.GetString(returndata);

 

相关文章:

  • 2022-12-23
  • 2021-07-28
  • 2022-12-23
  • 2022-12-23
  • 2021-09-07
  • 2021-08-30
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-09-02
  • 2021-06-23
  • 2021-12-18
  • 2021-06-30
  • 2021-09-09
  • 2022-12-23
相关资源
相似解决方案