[英]How to use html tag in code behind?
我需要在代碼后面使用諸如<sup></sup>
類的html標簽,而無需在aspx頁面中聲明任何內容。
到目前為止,我已經在下面嘗試過:
string s = HtmlTextWriterTag.Sup.ToString("1");
您可以使用HTML gerneric contorls
HtmlGenericControl sub= new HtmlGenericControl("sub"); sub.Attributes.Add("class", "your-class"); sub.ID = "subId"; sub.ClientIDMode = ClientIDMode.Static;
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.