Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7565885
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T14:16:19+00:00 2026-05-30T14:16:19+00:00

I am working on a Microsoft .NET Application in C# for Web Harvesting, Web

  • 0

I am working on a Microsoft .NET Application in C# for Web Harvesting, Web Scraping, Web Data Extraction, Screen Scraping, etc. Whatever you want to call it. For parsing HTML, I’m attempting to incorporate HTML Agility Pack but it’s not as easy as I thought it would be. I have included some specifications and images of what I have so far and was hoping to get your opinions on how I could proceed. basically, I want to do something similar to the layout used in Visual Web Ripper but I have no idea how they do it… Any ideas?

Specifications:

My goal is to make a very user friendly point-and-click application for downloading data and images from the web. I would like to load HTML pages using the web browser, and output the parsed data and image links into the text box. The user can specify which HTML tags they want and then download the data into the grid. Finally, export the data into whatever format they need.

I’m trying to use HTML Agility Pack to load the HTML on the webpage and display it in the textbox.

// Load Web Browser
private void Form6_Load(object sender, EventArgs e)
{
    // Navigate to webpage
    webBrowser.Navigate("http://www.webopedia.com/TERM/H/HTML.html");
    // Save URL to memory
    SiteMemoryArray[count] = urlTextBox.Text; 
    // Load HTML from webBrowser
    HtmlWindow window = webBrowser.Document.Window; 
    string str = window.Document.Body.OuterHtml;
    // Extract tags using HtmlAgilityPack and display in textbox
    HtmlAgilityPack.HtmlDocument HtmlDoc = new HtmlAgilityPack.HtmlDocument();
    HtmlDoc.LoadHtml(str);
    HtmlAgilityPack.HtmlNodeCollection Nodes =
        HtmlDoc.DocumentNode.SelectNodes("//a");
    foreach (HtmlAgilityPack.HtmlNode Node in Nodes)
    {
        textBox2.Text += Node.OuterHtml + "\r\n";
    }
}

Using:

HtmlWindow window = webBrowser.Document.Window;

I get the error: Object reference not set to an instance of an object.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T14:16:20+00:00Added an answer on May 30, 2026 at 2:16 pm

    You might not have the page load completed when you are referencing the browser window. You can have the browser control fire the navigationcomplete event when it is done. See this SO answer for an example: C# how to wait for a webpage to finish loading before continuing

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on a web-based application using asp.net 4.0. I have some dlls
I've just started working on a brownfield ASP.NET 2.0 Web Application. As with a
I'm working in a web application using VB.NET. There is also VisualBasic code mixed
I'm working on a Website Project (as opposed to an ASP.NET Web Application) which
I am developing one web application using asp.net 2005 and Microsoft SQL Server 2008
I am working on an asp.net web application which uses a fair bit of
I'm currently working on a web application in ASP.NET that displays reports (created with
What do you use for data synchronization? I have been working with Microsoft Sync
I'm working on a Microsoft Access application for a summer camp to track which
I'm working on a setup which wants to include the Microsoft.Web.Services3 (WSE 3.0) DLL

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.