Progamally save MHT without dialogue

Can I save a file of any type bypassing the save as dialog? using the webbrowser class

WebBrowser.ShowSaveAsDialog(); 

Is the downloaded content in a managed WebBrowser serializable so that it can be saved and retrieved (for re-display)?

+6
c # mhtml winforms webbrowser-control
source share
2 answers

Given that you have full access to the DOM and therefore you can read any content displayed in WebBrowser, it should be .

  • Using a DOM Node Tree Reads WebBrowser Content Into C # World
  • Writing to a file using normal access to .NET files.

However, if you just want to load the web page and save it to disk, then it’s better to use the WebBrowser control, see the WebClient class

+2
source share

I see that this is an old question, but I'm just going to update a possible alternative.

Please have a look at this CodeProject article .

0
source share

All Articles