摘要:
这是一个下载网页非常简单,但是非常有限的方法.1 using System.Net;2 3 var wc = new WebClient(); //新建一个WebClient对象 wc4 string href = wz; //网址为字符串 wz5 var html = wc.DownloadString(href); //html 就是wz的网页内容得到这个html就可以做一些自己想做的事情.此方法检索指定的资源。下载该资源之后,此方法使用在Encoding属性中指定的编码将该资源转换为String。WebClient client = new WebClie... 阅读全文