Try this
1 .Define HTMLDocumentClass object
private mshtml.HTMLDocumentClass pHTMLDoc;
2. In the document complete event do this
private void myBrowser_DocumentComplete(object sender,
AxSHDocVw.DWebBrowserEvents2_DocumentCompleteEvent e)
{
pHTMLDoc= (HTMLDocumentClass)DesignBrowser.Document;
}
3. To save
pHTMLDoc.execCommand ("SaveAs", false, @"c:\test.html");
4. To open html page navigate browser
string htmlfile =@c:\test.hml";
object oEmpty = null;
object oUrl = htmlfile;
myBrowser.Navigate ( ref oUrl, ref oEmpty, ref oEmpty, ref oEmpty, ref
oEmpty );
--
Shak
(Houston)
"MrXs" <Mr******@hotmail-dot-com.no-spam.invalid> wrote in message
news:40**********@Usenet.com...
hi
how do i save the contents of a axWebBrowser1 to a htm file ?
i have a webpage loaded and would like to save it to my harddrive.
also how do i open the file from my harddrive to open in the
axWebBrowser1 box ?
Thanks MrXs