I am trying to test this pack but at this line
foreach (HtmlNode link in doc.DocumentNode.SelectNodes(@"//a[@href]"))
I receive this error "Object reference not set to an instance of an object."
Here is the code how I try to call it from my form.
private void button1_Click(object sender, EventArgs e) { Uri someSite = new Uri("http://www.nationalgeographic.com/"); // MessageBox.Show("Am deschis pagina"); IEnumerable<WebPage> theSitePages = WebPage.GetAllPagesUnder(someSite); // MessageBox.Show("Acuma afisez rezultatele"); listBox1.Items.AddRange(theSitePages.ToArray());