Re: Invoke 'Save As' Dialog to save WebBrowser control contents
- From: "Peter Duniho" <NpOeStPeAdM@xxxxxxxxxxxxxxxx>
- Date: Tue, 22 Jan 2008 23:57:34 -0800
On Tue, 22 Jan 2008 23:29:03 -0800, Shug <enoesque73@xxxxxxxxxxx> wrote:
I looked briefly at SaveFileDialog and most of it looked ok, but I
couldn't see where I can populate the actual content to be saved,
which would be my formatted HTML.
Have I missed some really obvious way of doing this?
Nicholas obviously thought your original question was simply about how to get a dialog that the user can use to specify a file to save. It's what I thought too.
If you're asking also for help in actually saving the data, then the dialog isn't going to do that for you. You still will want to use the dialog to get the path for where to save the data. But then you need to use that path to create some kind of file i/o class instance that can write the data for you (I think the StreamWriter class is probably a good choice for what you're doing...if you've got the HTML as a string, you can just write that whole string to the file with a StreamWriter instance).
Pete
.
- Follow-Ups:
- References:
- Invoke 'Save As' Dialog to save WebBrowser control contents
- From: Artie
- Re: Invoke 'Save As' Dialog to save WebBrowser control contents
- From: Nicholas Paldino [.NET/C# MVP]
- Re: Invoke 'Save As' Dialog to save WebBrowser control contents
- From: Shug
- Invoke 'Save As' Dialog to save WebBrowser control contents
- Prev by Date: Re: changing access modifier of base method
- Next by Date: Enryption and Decryption in ASP.net
- Previous by thread: Re: Invoke 'Save As' Dialog to save WebBrowser control contents
- Next by thread: Re: Invoke 'Save As' Dialog to save WebBrowser control contents
- Index(es):