Save HTML without dialogue

  • Thread starter Thread starter Alexander Vasilevsky
  • Start date Start date
A

Alexander Vasilevsky

Need save HTML without dialogue.

In doing so:
private void MainForm_Load(object sender, EventArgs e)
{
webBrowser1.Navigate(@"Ó:\temp\source\1.mht");
}

private void _WebBrowser_Navigated(object sender,
WebBrowserNavigatedEventArgs e)
{
webBrowser1.Document.ExecCommand("SaveAs", false,
@"Ó:\temp\1.mht");
}Or this:
private void MainForm_Load(object sender, EventArgs e)
{
webBrowser1.Navigate(@"Ó:\temp\source\1.mht");
}

private void _WebBrowser_Navigated(object sender,
WebBrowserNavigatedEventArgs e)
{
IHTMLDocument2 domDocument = (IHTMLDocument2)
webBrowser1.Document.DomDocument;
currentDoc.execCommand("SaveAs", false, @"Ó:\temp\1.mht");
}I can not understand what a mistake?

http://www.alvas.net - Audio tools for C# and VB.Net developers + Christmas
discount
 
Alexander,

It doesn't look like you are doing anything wrong. I have a nagging
suspicion that it is a security issue of some kind.

What is the platform that you are running on, and what is the version of
IE that is installed on the platform?
 
Yes, this is a security limit
use WebBrowser.DocumentStream Property to get/set the document content

--
Sheng Jiang
Microsoft MVP in VC++
Nicholas Paldino said:
Alexander,

It doesn't look like you are doing anything wrong. I have a nagging
suspicion that it is a security issue of some kind.

What is the platform that you are running on, and what is the version of
IE that is installed on the platform?

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Alexander Vasilevsky said:
Need save HTML without dialogue.

In doing so:
private void MainForm_Load(object sender, EventArgs e)
{
webBrowser1.Navigate(@"Ó:\temp\source\1.mht");
}

private void _WebBrowser_Navigated(object sender,
WebBrowserNavigatedEventArgs e)
{
webBrowser1.Document.ExecCommand("SaveAs", false,
@"Ó:\temp\1.mht");
}Or this:
private void MainForm_Load(object sender, EventArgs e)
{
webBrowser1.Navigate(@"Ó:\temp\source\1.mht");
}

private void _WebBrowser_Navigated(object sender,
WebBrowserNavigatedEventArgs e)
{
IHTMLDocument2 domDocument = (IHTMLDocument2)
webBrowser1.Document.DomDocument;
currentDoc.execCommand("SaveAs", false, @"Ó:\temp\1.mht");
}I can not understand what a mistake?

http://www.alvas.net - Audio tools for C# and VB.Net developers +
Christmas discount
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top