Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

96
Views
How do I download contents in Anchor tag via WebClient?

I am trying to use System.Net.WebClient to download a file from a website. I am able to download specific files in general just fine using this method: The general idea is to use the following:

 WebClient Client = new WebClient();
 Client.DownloadFile("https://www.Example.File.xlsx", @"D:\MyDirectory\MyFile.xlsx");

But my problem is that I am not downloading a visible file per se from the website. Instead the file I need to download is embedded inside of an anchor tag with javascript as below:

   <a href="javascript:downloadfile();">Export File</a>

So the piece I am missing is how to convert this anchor tag into a proper file to feed into my WebClient DownloadFile process. Does anyone happen to know the missing step here?

I am building this in a C# console app, so the solution will need to be compatible with this.

Thanks in advance.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!