http://www.csdn.net/develop/Read_Article.asp?Id=17697

解决方案 »

  1.   

    using System.Net;
    using System.Collections.Specialized;string uriString = "http://xxx/form.aspx";WebClient myWebClient = new WebClient();NameValueCollection myNameValueCollection = new NameValueCollection();
    myNameValueCollection.Add("PigName","xxx");
    myNameValueCollection.Add("PigHeight","xxx");byte[] responseArray = myWebClient.UploadValues(uriString,"POST",myNameValueCollection);