摘要:
方法一:采用 WebClient ,代码如下using System.Net;{ string strurl="网址"; WebClient aWebClient = new WebClient(); aWebClient.Encoding = System.Text.Encoding.UTF8; string htmlcode = aWebClient.DownloadString(strurl); txtbox.Text=htmlcode;//txtbox为一个文本框}方法二:采用 HttpWebRequest HttpWebResponse ,代码如下using System.Net;{ 阅读全文