webBrowser control - modify the "head" of a document

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top