6

Is it possible to save a file of any type bypassing the 'save as' dialog? using the WebBrowser Class

WebBrowser.ShowSaveAsDialog();

Is the loaded content in a WebBrowser control serializable so it can be saved and retrieved (for redisplay)?

Cœur
  • 32,421
  • 21
  • 173
  • 232
zion
  • 153
  • 3
  • 7

2 Answers2

2

Given that you have full access to the DOM and can therefore read any contents that the WebBrowser is displaying the answer must be yes.

  • Using the tree of DOM nodes read the contents of the WebBrowser into the C# world
  • Write to the file using normal .NET file access

However if you just wish to download a webpage and save it to disk there are better ways then using the WebBrowser control, have a look at the WebClient class

Ian Ringrose
  • 49,271
  • 50
  • 203
  • 302
0

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

Please take a look in this CodeProject article.

sjlewis
  • 716
  • 1
  • 11
  • 24