You should override the Navigating event of the browser control. You're going to have to figure out when the URL is the download url (the file name might change, but it might be in a certain path or something), and cancel the navigation, then download the url with the WebClient class.
private void webBrowser1_Navigating(object sender, WebBrowserNavigatingEventArgs e)
{
//e.Url is the URL of the request
//e.Cancel = true; will cancel the request in the web browser so you can handle it on your own
}
Tekmaven
Software Architect
1,274 posts since Feb 2002
Reputation Points: 322
Solved Threads: 28
So what exactly initiates the download? It comes from javascript? You might have to just parse the javascript. Sendkeys would be a cop out :)
Tekmaven
Software Architect
1,274 posts since Feb 2002
Reputation Points: 322
Solved Threads: 28