I'm not clear if you're doing this in a WinForm or not. If you're talking about WinForms, then I can help you ... having just done this very same thing a couple of weeks ago.
First, you should use .NET 2.0's new WebBrowser control instead of the old ActiveX one. You also have to use the IHTMLDocment2 interface. The trick is setting a designMode property before you populate the DocumentText property.
protected IHTMLDocument2 oDocument;
private System.Windows.Forms.WebBrowser oBrowser = new WebBrowser();
this.oBrowser.DocumentText = "";
this.oDocument = this.oBrowser.Document.DomDocument as IHTMLDocument2;
this.oDocument.designMode = "On";
this.oBrowser.DocumentText = this.MyTable.DefaultView[MyPosition][MyColumn].ToString();
Does that help?
~~Bonnie
>Hi,
>I created user control to host IE webbrowser as html editor. I have problem that, if I change content of body.bodyhtml programmatically, webbrowser will prompt AskForSave dialog.
>
>Anyway to prevent the dialog prompted? Or, any other free html editor component?
>
>Thank you
this.oDocument.designMode = "On";