|
-
Dec 7th, 2010, 05:05 AM
#1
Thread Starter
Hyperactive Member
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
-
Dec 7th, 2010, 01:31 PM
#2
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
-
Dec 7th, 2010, 09:34 PM
#3
Thread Starter
Hyperactive Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|