ASP.NET 服務器控件對應HTML標簽


ASP.NET 服務器控件渲染到客戶端之后對應的HTML標簽講解.

label----------<span/>
button---------<input type="submit"/>
textbox--------<input type="text"/>
linkbutton-----<a href="javascript:" />
imagebutton----<input type="image"/>
hyperlink------<a />
dropdownlist---<select />
listbox--------<select size=""/>
checkbox-------<input type="checkbox"/>
checkboxlist---
 <table id="CheckBoxList1" border="0">
 <tr>
  <td><input id="CheckBoxList1_0" type="checkbox" name="CheckBoxList1$0" /><label for="CheckBoxList1_0">1</label></td>
 </tr><tr>
  <td><input id="CheckBoxList1_1" type="checkbox" name="CheckBoxList1$1" /><label for="CheckBoxList1_1">2</label></td>
 </tr>
</table>

radiobutton------<input type="radio" />
radiobuttonlist----
 <table id="RadioButtonList1" border="0">
 <tr>
  <td><input id="RadioButtonList1_0" type="radio" name="RadioButtonList1" value="1" /><label for="RadioButtonList1_0">1</label></td>
 </tr><tr>
  <td><input id="RadioButtonList1_1" type="radio" name="RadioButtonList1" value="2" /><label for="RadioButtonList1_1">2</label></td>
 </tr>
</table>

image-----------<img />
imagemap--------<img ><map /></img>

table-----------<table />

BulletedList-----
 <ul id="BulletedList1">
 <li>1</li><li>2</li>
</ul>

hiddenfield----<input type="hidden" />
Literal--------只渲染一段純文本到客戶端

calendar----<table><tr><td><a href="javascript:" /></td><tr></table>

adrotator---- <a id="AdRotator1" ><img /></a>

fileupload-----<input type="file"/>

wizard---------<table />

multiview(view)----渲染到客戶端的只是每個view之內的部分,這兩個服務器控件本身不render為任何標簽

Substitution------只渲染一段純文本到客戶端

Localize----------只渲染一段純文本到客戶端

gridview,datalist,dataview,formview----------<div><table/></div>

listview,repeater-------它本身只渲染一個div到客戶端,div的內容完全取決於listview的模板設定

datapager--------<span><a/>...</span>

驗證系列控件-----渲染為<span/>,驗證信息就顯示為span內的文本

menu,treeview----最外面是一個<div>,每一個菜單item都渲染為一個table,子菜單的展開時的圖片是<a><img></a>

SiteMapPath------<span><a><img></a></span>


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM