Reputation: 13
i have problem and if someone can help me please. i want to load html.
var webGet = new HtmlWeb();
var doc = webGet.Load(@"https://example.com/search_engine/jobs.cgi?owner=5027409&ownertype=fair&posting_code=612");
i using htmlagilitypack but it can't load html. I download html in my local PC and it load from there.
Many Thanks.
Upvotes: 0
Views: 5154
Reputation: 3082
You're overdoing it a little. All you need is:
//using for IDisposable.Dispose()
using (WebClient client = new WebClient())
{
string html = client.DownloadString("http://stackoverflow.com");
//Do something with html then
}
Upvotes: 2