title: Html Agility Pack. Load and scrape webpage
body: <p>Is this the <em>best</em> way to get a webpage when scraping?</p>
  
  <pre><code>HttpWebRequest oReq = (HttpWebRequest)WebRequest.Create(url);
  HttpWebResponse resp = (HttpWebResponse)oReq.GetResponse();
  
  var doc = new HtmlAgilityPack.HtmlDocument();
  
  doc.Load(resp.GetResponseStream());
  var element = doc.GetElementbyId("//start-left");
  var element2 = doc.DocumentNode.SelectSingleNode("//body");
  string html = doc.DocumentNode.OuterHtml;
  </code></pre>
  
  <p>I've seen <code>HtmlWeb().Load</code> to get a webpage. Is that a better alternative to load and the scrape the webpage?</p>
  
  <hr>
  
  <p>Ok i'll try that instead.</p>
  
  <pre><code>HtmlDocument doc = web.Load(url);
  </code></pre>
  
  <p>Now when i got my <code>doc</code> and didn't get so mutch properties. No one like <code>SelectSingleNode</code>. The only one I can use is <code>GetElementById</code>, and that works but I whant to get a class.</p>
  
  <p>Do I need to do it like this?</p>
  
  <pre><code>var htmlBody = doc.DocumentNode.SelectSingleNode("//body");
  htmlBody.SelectSingleNode("//paging");
  </code></pre>