Skip to content Skip to sidebar Skip to footer

HtmlAgilityPACK Showing Error " The Given Path's Format Is Not Supported" When Loading Html Page From Web Server

I am using my local Apache Server and its address is 127.0.0.1 . and i trying to load html page from this server to C# programme using HTML Agility PACk but its showing ERROR

Solution 1:

doc.Load takes a path to a local file on disk.

You should use the HtmlWeb class:

HtmlDocument docHtml = new HtmlWeb().Load(url);

Post a Comment for "HtmlAgilityPACK Showing Error " The Given Path's Format Is Not Supported" When Loading Html Page From Web Server"