我試圖用c#下載學校項目的此網頁的源代碼。
這是網頁IM試圖得到:如無法從網頁下載源代碼
HttpWebRequest request = (HttpWebRequest)
WebRequest.Create("http://www.epicurious.com/tools/fooddictionary/entry?id=1650");
,並通過使用
WebClient client = new WebClient();
string value = client.DownloadString("http://www.epicurious.com/tools/fooddictionary/entry?id=1650");
http://www.epicurious.com/tools/fooddictionary/entry?id=1650
我曾嘗試代碼並沒有方法讓我的網頁源代碼。任何幫助,將不勝感激。
當你說「源」時,你的意思是HTML,對吧? –