C# WebBrowser control not displaying custom HTML -
i have web browser control reason isn't loading html:
string updatingchathtml = "" + "<html> " + "<head>" + "<style>" + "body {" + " margin: 0px;" + " padding: 0px;" + " background: " + chatbackground + ";\n" + " font-family: arial;" + " font-size: 11px; " + " text-align: left;" + "}" + "</style>" + "</head>" + "<body>"; txtchat.documenttext = updatingchathtml + "</body></html>";
(txtchat webbrowser control).
the weird thing is, working before changed something, can't figure out changed caused stop working.
i have breakpoint set after last line above, , can see updatingchathtml has proper value it's meant to, txtchat.documenttext still has value of <html></html>\0
.
i thought maybe initialisation thing, added txtchat.navigate("about:blank");
prior assignment, still doesn't work.
this event gets fired quite though, , first time/two times, doesn't work, after form finished loading seems to, it's last thing happen on form_load.
any suggestions?
attempting set documenttext
property when
- no document loaded
- or browser control not in ready state (e.g. loading document)
will cause property assignment fail silently.
after calling navigate
function should monitor documentcompleted
event notification of when navigation operation completes.
Comments
Post a Comment