0
我使用Nuget將HTML Agility Pack(HAP)添加到了我的解決方案中。我的解決方案使用Silverlight 5.我可以從「使用HtmlAgilityPack;」調用一些函數但有些功能我不能打電話。我需要通過下面的代碼行獲取URL的內容:如何在Lightswitch 2013桌面應用程序中使用HTML Agility Pack
string Url = "http://google.com.vn"; // this line is okay
HtmlWeb web = new HtmlWeb(); // this line is okay
HtmlDocument doc = web.Load(Url); // but this line is highlighted with an error 'Error HtmlAgilityPack.HtmlWeb' does not contain a definition for 'Load' and no extension method 'Load' accepting a first argument of type 'HtmlAgilityPack.HtmlWeb' could be found (are you missing a using directive or an assembly reference?)'
嘗試'LoadAsync()'和'LoadCompleted'。 – CodeCaster
LoadAsync沒有參數LoadCompleted。我試過了 –