获取指定目标的网页源代码!
private string getHtml(string url)
{
WebClient myWebClient = new WebClient();
byte[] myDataBuffer = myWebClient.DownloadData(url);
return Encoding.Default.GetString(myDataBuffer);
}
{
WebClient myWebClient = new WebClient();
byte[] myDataBuffer = myWebClient.DownloadData(url);
return Encoding.Default.GetString(myDataBuffer);
}