how to download a file using webbrowser?

0

someone could guide me with this, I want to download a file from a web page without showing using the webbrowser control, without displaying a download dialog box, which is downloaded automatically. The item I want to download has the following code:

<a class="accionicon" href="/Exito/DownloadRepresentacionImpresa?rfc=XXXXX000XX&amp;uuid=99094a5f-547a-474e-852d-5fe75f36e218" style="color:inherit;"><span title="Descargar representación impresa" class="glyphicon glyphicon-file"></span></a>

It is worth mentioning that the url is not the same, it generates a different one in each session within the page

    
asked by Benji 09.01.2018 в 04:02
source

1 answer

0

You can add the download attribute in the < a > tag, setting the name and extension with a server-side or client-side logic:

<a class="accionicon" download="yourfile.jpg" href="/Exito/DownloadRepresentacionImpresa?rfc=XXXXX000XX&amp;uuid=99094a5f-547a-474e-852d-5fe75f36e218"   style="color:inherit;"><span title="Descargar representación impresa" class="glyphicon glyphicon-file"></span>EEE</a>

In this link you can validate which browsers support this attribute.

    
answered by 10.01.2018 в 07:30