D
Dan
I'd like to display some HTML code in a form using the axwebbrowser control,
without having to create a temporary file to navigate to. I'm trying the
following code (let's say that the web browser control is named wbb):
object o = System.Reflection.Missing.Value;
wbb.Navigate("about:blank", ref o, ref o, ref o, ref o);
while (wbb == null) Application.DoEvents();
mshtml.HTMLDocument doc = (mshtml.HTMLDocument)wbb.Document;
doc.body.innerHTML = "...(my html code)...";
here the last line of code throws an exception as doc.body is null, even if
I have forced the control to navigate to the blank page to avoid this.
What's the correct way of setting the HTML code of a webbrowser control?
Thanks guys!
without having to create a temporary file to navigate to. I'm trying the
following code (let's say that the web browser control is named wbb):
object o = System.Reflection.Missing.Value;
wbb.Navigate("about:blank", ref o, ref o, ref o, ref o);
while (wbb == null) Application.DoEvents();
mshtml.HTMLDocument doc = (mshtml.HTMLDocument)wbb.Document;
doc.body.innerHTML = "...(my html code)...";
here the last line of code throws an exception as doc.body is null, even if
I have forced the control to navigate to the blank page to avoid this.
What's the correct way of setting the HTML code of a webbrowser control?
Thanks guys!