是否可以在ASP.NET中动态生成<p>?

时间:2017-10-19 06:56:16

标签: html asp.net vb.net

是否可以在ASP.NET代码中动态生成<p>(VB)?我一直试图找到一个使用<p>生成HtmlGenericControl的示例,就像通常Dim div As New HtmlGenericControl("DIV")一样? 提前谢谢!

1 个答案:

答案 0 :(得分:1)

你这样做:

Dim p As HtmlGenericControl = New HtmlGenericControl("p")
p.InnerText = "The content goes here"
PlaceHolder1.Controls.Add(p)
相关问题