Download File Silently with DotNetBrowser

160 Views Asked by At

How can I download files silently with the DotNetBrowser?

Every time I download a file, I am shown the file dialog.

In the example below, there is a download link on the page. When I click it, I would like the file to download without a file dialog. Instead, the file dialog is shown.

oBrowser.DownloadHandler = New DotNetBrowser.WinForms.WinFormsDefaultDownloadHandler(Me, DownloadMode.Silent)

Dim document As DotNetBrowser.DOM.DOMDocument = oBrowser.GetDocument()
Dim oDownloadLink As DotNetBrowser.DOM.DOMElement = document.GetElementById("DownloadItem")

oDownloadLink.Click()

I am using VB.net, but a solution in C# or VB.net would be great.

0

There are 0 best solutions below