I have a WebBrowser control that automatically logs me into a website and tries to download CSV data automatically. Everything works fine, except when it tries to load CSV data, a dialog box appears asking if I want to save the file or open it (as in IE). What I'm trying to do is automatically load the CSV file into a file of my choice (or is it better to save the CSV file directly in a string variable). I cannot figure out how to suppress the dialog box and automatically load the download. I searched and found some solutions, however they do not work for me because:
1) Now I am using the GUI. All this is done in the class (therefore methods like SendKeys will not be a viable solution)
2) Downloading is from a secure site and requires authentication. The WebBrowser control handles everything for me, but if I use WebRequest and WebResponse to try to capture the download, I am no longer authenticated.
I am using C #. Any help would be appreciated.
source
share