tags:

views:

931

answers:

5

I have a .net (3.5) WinForms application and want to display some html on one of the forms. Is there a control that I can use for this?

A: 

Do you need to display it as rendered or just as text?

EBGreen
+4  A: 

Yep sure is, the WebBrowser control.

Tim Jarvis
A: 

what about the browser control? a bit heavy, but at least you'll get an accurate rendering.

Darren Kopp
+2  A: 

I was looking at the WebBrowser control but couldn't work out how to assign (set) the HTML to it...?

EDIT: Found it - Document Text

Guy
`webBrowser.DocumentText = htmlString`
Kit Roed
A: 

In the control you should be able to do something like .Document.Body.InnerHTML = Your HTML. I don't remember the exact properties but it would be something along those lines.

EBGreen