webBrowser control - modify the "head" of a document

  • Thread starter Thread starter Boban Dragojlovic
  • Start date Start date
B

Boban Dragojlovic

I'm using the WebBrowser COM control in .NET, and I've discovered that I can
load any HTML into the browser via
myBrowser.document.body.innerHTML = "..."


the problem is that this only loads the "<BODY>" portion of the document.

I need to also load style defifinition rules (I'm using a bunch of CSS for
formatting), but I don't know how to do that.

Although the WebBrowser has a document.body property, it does NOT seem to
have a document.head property.


Is there perhaps a different way of loading style information (preferably a
way other than providing a LINK to a file on disk -- I would like to provide
it dynamically at run-time, just like I do with the HTML)

Thanks,

Boban
 
Back
Top