The Label control in ASP.NET seems to render Sure, I coul
tags, but is there a server control to render HTML within a
I think you need HtmlGenericControl class. It has a constructor which accepts a string variable which initializes a new instance of the HtmlGenericControl
class with the specified tag:
var div = new HtmlGenericControl("div");
It is also has InnerHtml
and InnerText
properties (you mentioned this in a comment to the previous answer).