我看了webBrowser控件有Navigate属性可以浏览某一个uri,不知能能浏览即时生成的html? 如:窗口有一个textbox与webBrowser控件,我想在textbox里输入html或是另的,然后呢,在webBrowser控件可以显示浏览这些html内容!!! how to 或是用什么控件可以实现?
Add Reference to mshtml assembly (you can find it on reference list).
Then:
mshtml.IHTMLDocument2 doc = webBro.Document as mshtml.IHTMLDocument2;
mshtml.IHTMLElement body = doc.body;
body.innerHTML = strHTML;
OR
webBro.Naviage("about:<html><body>here goes your html code</body></html>", ...);
In the second method the html can't be too long...