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
  • 37,241
  • 25
  • 195
  • 267
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
  • 51,220
  • 55
  • 213
  • 317
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
  • 780
  • 2
  • 13
  • 25