Hi,
I'm using the WebBrowser control (.NET 2.0) to login to a website and
download a file. I navigate to the login page of the website, then
programatically fill username and password to login. Then I navigate to the
URL of the file. It all works fine, but I get the IE Save Dialog box when I
navigate to the file URL.
Is there a way to suppress this Save Dialog and instead download the file to
a given location.
I know the WebClient class has a DownloadFile method, but I need to be
logged-in to the website in order to download (i.e need to have a valid
session). I don't think the WebClient or WebRequest will allow me to access
the home page and login before accessing the URL for the file.
Could you help?
- &
Sheng Jiang[MVP] - 28 Dec 2007 19:58 GMT
You can use WebClient or WebRequest to make multiple requests with the same
cookie container
To enable WebClient to use a cookie container you need to override the
GetWebRequest method, create a request that reuses the cookie container
between requests.

Signature
Sheng Jiang
Microsoft MVP in VC++
> Hi,
>
[quoted text clipped - 15 lines]
>
> - &