Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

95
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda