how to disable the file download popup window?
I'm using a webbrowser in the program. it will login a site, then get a special link which is a csv file on the site. then I need download the file. since the site needs login and uses https, so, I use webbrowser.
now, I can login, but when I click the file link, it will pop a message box and ask me to save/open it.
is it possible to disable this popup window and save the file to local directly?
thanks
Re: how to disable the file download popup window?
You should be able to use the WebClient class, and the DownloadFile method of it:
vb.net Code:
Using wc = New Net.WebClient()
wc.Credentials = '//supply credentials
wc.DownloadFile("address", "fileName")
End Using
Re: how to disable the file download popup window?
unfortunately, I can not use webclient. because I need login the site to get the file url, the site is a https, and it seems the site also uses a cookie. so, if I just send a get request, it will fail. I have to use program login, then from webbrowser to load the url, but it will pop the file "open/save as" message box.
can I get around this and save the file directly?
thanks