title: HTMLAgilityPack load AJAX content for scraping
body: <p>Im trying to scrape a webpage using HTMLAgilityPack in a c# webforms project.</p>
  
  <p>All the solutions Ive seen for doing this use a WebBrowser control. However, from what I can determine, this is only available in WinForms projects.</p>
  
  <p>At present Im calling the required page via this code:</p>
  
  <pre><code>var getHtmlWeb = new HtmlWeb();
  var document = getHtmlWeb.Load(inputUri);
  HtmlAgilityPack.HtmlNodeCollection nodes = document.DocumentNode.SelectNodes("//div[@class=\"nav\"]");
  </code></pre>
  
  <p>An example bit of code that Ive seen saying to use the WebBrowser control:</p>
  
  <pre><code>if (this.webBrowser1.Document.GetElementsByTagName("html")[0] != null)
  _htmlAgilityPackDocument.LoadHtml(this.webBrowser1.Document.GetElementsByTagName("html")[0].OuterHtml);
  </code></pre>
  
  <p>Any suggestions / pointers as to how to grab the page once AJAX has been loaded, will be appreciated.</p>