Using webbrowser control (.NET 2.0)
I have a string with various html code in it. I would like to display this string/code in a webbrowser control so the user will see it as html and not simple text, however, I cannot find a way to pass html directly into the webbrowser control. Must I write the code to a local file and then have the webbrowser control navigate to it...or is there a better way to display simple html in a textbox-like control?
I've found some html textbox controls on the net, but these a too simple and don't provide the level of html interpretation that I need. Perhaps there is one that I am missing? If anyone has one to suggest, I'd be glad to hear it!
Thanks for any guidance.
-T
[681 byte] By [
tonyc2a] at [2007-12-24]
Hi there,
I have a similar quaetion as Tony, however the only problem is I'm working on dot net 1.1, which doesnot have the documnettext property. Could you suggest me a way to display html code as an html page.
Thanks,
Nitasha
Hi Andrej,
Thanx for the reply,
I'm able to pass my html code into WebBrowser control, however webbrowser is not rendering the images present in the code. If you know any link related to this issue please let me know. I would really appreciate it.
Thanx once again,
Nitasha
That might depend on how images are referenced in your html code (using relative or absolute paths). If you want your images to be displayed correctly, it would be best to use absolute paths, pointing either to some web address ( http://...) or file system (file:///...).
Andrej