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

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -