Display HTML string in WebBrowser control

Welcome to Wisej Support.
Questions, suggestions and plain old bugs - are all welcome here!


I am trying to display some HTML in a WebBrowser control, however, I cannot seem to figure out how to achieve this.

Basically I am after something like this

webBrowser1.html = “<html><head><title>Test Title</title></head><body bgcolor = “#ffffcc” text = “#000000″><h1>Hello, World!</h1><p>You can modify the text in the box to e ft any way you like.</p></body></html>”

Clearly the “html” bit is wrong in the above code.  Anyone any idea’s how I can make this happen, I would have thought this would be very simple.



  • You must to post comments

Hi Steve,

The WebBrowser control doesn’t have the Html property, it’s meant to be used to browse a Url since it’s an IFrame on the client.

With Wisej you can display HTML in any control that can show text: label, button, combobox, radiobutton, etc. It’s enough to set AllowHtml = true and the Text property will accept HTML code. We also have the HtmlPanel control that has the Html property that you can assign with html text, or the HtmlSource property that you can assign to an html file in your application.




  • You must to post comments

Check your quote types.  In your body tag, you have a left-double-quotation mark opener and ASCII double quotation marks closing it. In VB.net , that line would not work without single-quotes  (ie, apostrophe) because double-quotes are string terminators.

  • You must to post comments
Showing 2 results
Your Answer
Post as a guest by filling out the fields below or if you already have an account.
File Name Size
There are currently no files uploaded.
Maximum number of files 5, maximum file size 3.9MB.
Supported file formats: zip pdf gif jpg bmp png cs vb theme json mixin.theme