.NET获得远程网页内容

时间: 2011-02-15 / 分类: Asp.Net / 浏览次数: / 0个评论 发表评论
http://www.Flexzoo.com/“;

WebClient wc = new WebClient();
wc.Credentials = CredentialCache.DefaultCredentials;
Byte[] pageData = wc.DownloadData(gurl);

string getHTML = Encoding.UTF8.GetString(pageData);

Response.Write(getHTML);

此输出的就是运程网页的内容了。

相关文章:

  • 2021-09-27
  • 2021-09-15
  • 2022-12-23
  • 2021-07-10
  • 2022-12-23
  • 2021-05-23
  • 2021-08-03
  • 2022-02-13
猜你喜欢
  • 2021-06-15
  • 2021-08-05
  • 2021-09-27
  • 2021-09-04
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案