Hi All,
I have made a usercontrol with a webbrowser control in it.
this usercontrol is placed on a form named form2(in another windows form project).
form2 is called/launched from form1 with a button.
I want to set the body.innerhtml of the usercontrol, but can't get it to work. Maybee i'm missing something or overlook something.
If i place a button on form2 and call the setHTML then it works fine.
But what i want is from the button on form1, open form2 and pass a value to setHTML of the usercontrol.
Can you help me with this one ?
Thanks, Danny.
the code i'm using for the user control is as follows,
private mshtml.IHTMLDocument2 doc;
private string EditInnerHtml;
public UserControl1()
{
InitializeComponent();
}
public void setHTML(String html)
{
EditInnerHtml = html;
doc.body.innerHTML = EditInnerHtml;
}
private void UserControl1_Load(object sender, EventArgs e)
{
doc = (mshtml.IHTMLDocument2)this.webBrowser1.Document.DomDocument;
doc.designMode = "On";
}