檢索網頁的 HTML(簡單)
string contents = "";
string url = "http://msdn.microsoft.com";
using (System.Net.WebClient client = new System.Net.WebClient())
{
contents = client.DownloadString(url);
}
Console.WriteLine(contents);
string contents = "";
string url = "http://msdn.microsoft.com";
using (System.Net.WebClient client = new System.Net.WebClient())
{
contents = client.DownloadString(url);
}
Console.WriteLine(contents);