开发者

c# webcontrol - how to load a html on the fly?

I would like to load HTML using c#'s webbrowser component. I looked up MSDN, but I can't find anything that can load a s开发者_JAVA技巧tring(HTML) into webbrowser component. I only see navigate() method to load a URL.

so..I would like to the following if possible

String htmlcontent = "<html><head><title>test</title></head><body>my content here</body></html>";

webBrowser1.load(htmlContent) 

something like this..I load that there is no load() method.


You're looking for the DocumentText property.
Note that it's asynchronous; the content will not necessarily loaded when your next line of code runs.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜