What is the best way to write/output html in a webpart?
I am coming from PHP, there it was pretty straightforward.
I have seen the HtmlTextWriter, but I think that is very odd and makes it even more complicated.
Thank you!
If you just want to output HTML directly using code then you should override the RenderContents Method and call the methods on the HtmlTextWriter it gets as parameter.
But many prefer to use ASP.NET controls which should be created inside an override of CreateChildControls Method