title: How to check if it is 404 error page(page does not exist) using HtmlAgilityPack
body: <p>Here i am trying to read urls and getting the images in a page. I need to exclude the page if it is 404 and stop getting the images from a 404 error page. How to do it using HtmlAgilityPack? Here is my code</p>
  
  <pre><code>var document = new HtmlWeb().Load(completeurl);
  var urls = document.DocumentNode.Descendants("img")
            .Select(e =&gt; e.GetAttributeValue("src", null))
            .Where(s =&gt; !String.IsNullOrEmpty(s)).ToList();
  </code></pre>