前面簡(jiǎn)單介紹完了asp.net 2.0之后,我們簡(jiǎn)單介紹一些html服務(wù)器控件。上一篇文章:asp.net入門(mén)教程:asp.net 2.0導(dǎo)航
html 服務(wù)器控件是服務(wù)器可理解的 html 標(biāo)簽。
html 服務(wù)器控件
asp.net 文件中的 html 元素默認(rèn)作為文本進(jìn)行處理。為了使這些元素可編程化,需要向 html 元素添加 runat=server 屬性。該屬性指示該元素應(yīng)作為服務(wù)器控件進(jìn)行處理。
注釋?zhuān)核?html 服務(wù)器控件必須位于帶有 runat=server 屬性的
標(biāo)簽內(nèi)!
注釋?zhuān)篴sp.net 要求所有 html 元素必須正確關(guān)閉和嵌套。
html 服務(wù)器控件描述
htmlanchor控制 <a> html 元素
htmlbutton控制 <button> html 元素
htmlform控制 <form> html 元素
htmlgeneric控制其他未被具體的 html 服務(wù)器控件規(guī)定的 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 元素
更多信息請(qǐng)查看IT技術(shù)專(zhuān)欄