【转】POST数据到指定url并返回结果页面内容
using System.Net;
using System.Collections.Specialized;
public string getPostBackStream(string rUrl)
{
 // Create a new WebClient instance.
 WebClient myWebClient = new WebClient();
 // Create a new NameValueCollection instance to hold
 // some custom parameters to be posted to the URL.
 NameValueCollection myNameValueCollection = new NameValueCollection();
 myNameValueCollection.Add("title","this is title");    
 myNameValueCollection.Add("url","http://www.zl5.info/tb_client.aspx");
 myNameValueCollection.Add("excerpt","this is excerpt");
 byte[] responseArray = myWebClient.UploadValues(rUrl,"POST",myNameValueCollection);
 return Encoding.ASCII.GetString(responseArray);
}
【转】POST数据到指定url并返回结果页面内容
【转】POST数据到指定url并返回结果页面内容
using System.Net;
using System.Collections.Specialized;
public string getPostBackStream(string rUrl)
{
 // Create a new WebClient instance.
 WebClient myWebClient = new WebClient();
 // Create a new NameValueCollection instance to hold
 // some custom parameters to be posted to the URL.
 NameValueCollection myNameValueCollection = new NameValueCollection();
 myNameValueCollection.Add("title","this is title");    
 myNameValueCollection.Add("url","http://www.zl5.info/tb_client.aspx");
 myNameValueCollection.Add("excerpt","this is excerpt");
 byte[] responseArray = myWebClient.UploadValues(rUrl,"POST",myNameValueCollection);
 return Encoding.ASCII.GetString(responseArray);
}
【转】POST数据到指定url并返回结果页面内容

相关文章:

  • 2021-06-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-19
  • 2022-12-23
相关资源
相似解决方案