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 8473045
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T17:14:27+00:00 2026-06-10T17:14:27+00:00

I am working on csv downloader project ,i need to download the CSV files

  • 0

I am working on csv downloader project ,i need to download the CSV files generated on the webpage . and using html agility , i found the exact link that contain the link for csv file

<a href="/content/fo/contractvol/datafiles/OPTIDX_NIFTY_CE_31-08-2012_TO_31-08-2012.csv" target="_blank">Download file in csv format</a>

now i want , without any activity from my side , the application must detect this link in the web page ( i could do it by Htmlagility ) and should download the file once the web page fully navigated in Web browser in my app. I tried some example in one of the SO click here post but getting

Error :Object reference not set to an instance of an object.

HtmlElementCollection links = webBrowser.Document.GetElementsByTagName("A");

foreach (HtmlElement link in links)  // this ex is given another SO post 
{
    if (link.InnerText.Equals("My Assigned"))
        link.InvokeMember("Click");
}

Can any body suggest how to do it ??

Solved :

I changed to HtmlElementCollection links = webBrowser.Document.GetElementsByTagName("A"); to HtmlElementCollection links = webBrowser1.Document.Links and used

 if (link.InnerText.Contains("My Assigned"))
{
        link.InvokeMember("Click");
}

. any one who better solution?

  • 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-06-10T17:14:29+00:00Added an answer on June 10, 2026 at 5:14 pm

    InnerText might be null so build in a safeguard, to check for null:

    if ((link.InnerText != null) && (link.InnerText.Equals("My Assigned")) )
            link.InvokeMember("Click"); 
    
    • 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 scenerio where i need to load 3 csv files
I am desperate to get a streaming CSV download working in my Rails 3.2.2
I am working on a streaming download (CSV) from Rails 3.2 and am coming
I'm working with 6 csv files that each contain the attributes of an object.
I`m working on a script to create csv files for an analysis. When running
I'm working some code that inserts csv rows into an SQLite database using Python.
I'm currently working on a project that involves a CSV file. I initially was
I need to export a really large csv file(~100MB). On the internet I found
I'm working with PHP and CSV files exported from Excel. My script to read
I need to download a CSV file from Google insights programatically. Since it requires

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.