-
Is it possible to dynamically create an HTML document in a string type and then pass it to a web browser control?
I can't see a way of doing it without saving the string as a file then pointing the webbrowser control to the file !!!
For example, if you have a text editor in which you are writing HTML code and you want to view it in a web browser which is sitting on a different tab (like frontpage) how can you send the HTML source to the browser?? I can only see how to pass it a URL or file... :(
-
You could tell it to navigate to "about:<html>The Source</html>"
like this:
Text1 is the source code
WebBrowser1.Navigate "about:" & Text1.Text
-
Your method sux
I used that method 3 years ago and it gave me lots of problem. Source code dover 2056 letters don't work if you use this method. Try writing a file into the same directory as your app then use the webbrowser to navigate there. at document complete, delete the temp file using kill(filename)
-
You could open it to a template HTML file, then use the MSHTML InnerHTML or InnerText functions to dynamically change the browser's source.