No, there is no built-in control specifically for <p>
. A LiteralControl
or the <p runat="server" />
version you gave are the closest you will get.
You could always create your own control, though. You can create a class that implements WebControl
, and override the Render
method:
protected override void Render(HtmlTextWriter output)
{
output.WriteFullBeginTag("p");
output.Write(this.Text);
output.WriteEndTag("p");
}
There are more instructions on how to write your own server controls here:
And a list of all of the .NET web and server controls here: