Does anybody know if you can access the SaevFileDialog control that's used by the WebBrowser control? Once somebody saves the webpage being displayed I need to catch where the files have been created; however I can't seem to find any events/members that allow me access to that information.
2 Answers
I'm pretty sure that you cannot access the Save As dialog that is provided by the WebBrowser control.
I'm not sure if you're writing a WinForms application or an ASP.Net application, but since you're using a WebBrowser control, I'm assuming that you're writing a WinForms application in which you want to show some HTML content.
In this case, if I wanted the end user to save to a specific location on their disk, I would provide my own Save button and in the button's Click event, I would read the text of the HTML displayed in the browser control (which can be done easily) and pass it to a System.IO.StreamWriter to save the contents to that file.
If you want to have the customers select where to save, then use a SaveFileDialog of your own in the button's Click event.

- 72,686
- 18
- 132
- 173
-
I thought about doing that; the problem is that I need to save all of the images as the standard webbrowser save dialog saves them; it seems a bit of a shame to have to reproduce functionality that already exists simply because the webbrowser control doesn't allow access to its dialog events. – Dale Jul 07 '09 at 09:18