top
Loading...
ASP.NET HTML 服務器控件

ASP.NET Web Forms - HTML 服務器控件


HTML 服務器控件是服務器可理解的 HTML 標籤。


HTML 服務器控件

ASP.NET 文件中的 HTML 元素,默認是作為文本進行處理的。要想讓這些元素可編程,需向 HTML 元素中添加 runat="server" 屬性。這個屬性表示,該元素將被作為服務器控件進行處理。

注釋:所有 HTML 服務器控件必須位於帶有 runat="server" 屬性的 <form> 標籤內!

注釋:ASP.NET 要求所有 HTML 元素必須正確關閉和正確嵌套。

HTML 服務器控件 描述
HtmlAnchor 控製 <a> HTML 元素
HtmlButton 控製 <button> HTML 元素
HtmlForm 控製 <form> HTML 元素
HtmlGeneric 控製其他未被具體的 HTML 服務器控件規定的 HTML 元素,比如 <body>、<div>、<span> 等。
HtmlImage 控製 <image> HTML 元素
HtmlInputButton 控製 <input type="button">、<input type="submit"> 和 <input type="reset"> HTML 元素
HtmlInputCheckBox 控製 <input type="checkbox"> HTML 元素
HtmlInputFile 控製 <input type="file"> HTML 元素
HtmlInputHidden 控製 <input type="hidden"> HTML 元素
HtmlInputImage 控製 <input type="image"> HTML 元素
HtmlInputRadioButton 控製 <input type="radio"> HTML 元素
HtmlInputText 控製 <input type="text"> 和 <input type="password"> HTML 元素
HtmlSelect 控製 <select> HTML 元素
HtmlTable 控製 <table> HTML 元素
HtmlTableCell 控製 <td> 和 <th> HTML 元素
HtmlTableRow 控製 <tr> HTML 元素
HtmlTextArea 控製 <textarea> HTML 元素

北斗有巢氏 有巢氏北斗