我想使用c#的webbrowser组件加载HTML.我查找了MSDN,但我找不到任何可以将字符串(HTML)加载到webbrowser组件中的内容.我只看到一个加载URL的navigate()方法.
所以..如果可能,我想要以下内容
String htmlcontent = "<html><head><title>test</title></head><body>my content here</body></html>";
webBrowser1.load(htmlContent)
Run Code Online (Sandbox Code Playgroud)
像这样的东西..我加载没有load()方法.
有没有办法在webControl中加载html作为字符串?
就像是:
webControl.Load("<!DOCTYPE html><html>...");
Run Code Online (Sandbox Code Playgroud)
像在普通的wpf webControl中使用的那样:
webControl.NavigateToString("<!DOCTYPE html><html>...");
Run Code Online (Sandbox Code Playgroud)