asp.net和Html控件映射关系
asp.net中的html控件runat=server时的映射
1、标准xhtml标签:http://blog.csdn.net/TangZhongxin/archive/2009/07/31/4398487.aspx
2、绝大多数标签都映射到“System.Web.UI.HtmlControls.HtmlGenericControl”,它们的共同特性是“信息只读,仅供显示的标记”:
div,span,p,h1,h2,h3,h4,h5,h6,ul,li,dl,dt,dd,
abbr,acronym,address,bdo,blockquote,pre,br,q,ins,del,sub,sup,hr,map,area,
optgroup,label,fieldset,legent,
em,strong,dfn,code,samp,kbd,var,cite,
tt,i,b,big,small,
colgroup,col,caption,thead,tbody,tfoot,
param,
title,base,link,meta,style,
3、链接和图像、对象类标签
标签a,映射到 System.Web.UI.HtmlControls.HtmlAnchor ;
标签img,映射到 System.Web.UI.HtmlControls.HtmlImage ;
标签object,不能映射;
标签param,映射到
System.Web.UI.HtmlControls.HtmlGenericControl;
4、form表单类标签:
form | System.Web.UI.HtmlControls.HtmlForm |
input type="text" | System.Web.UI.HtmlControls.HtmlInputText |
input type="button" | System.Web.UI.HtmlControls.HtmlInputButton |
input type="checkbox" | System.Web.UI.HtmlControls.HtmlInputCheckBox |
input type="file" | System.Web.UI.HtmlControls.HtmlInputFile |
input type="hidden" | System.Web.UI.HtmlControls.HtmlInputHidden |
input type="image" | System.Web.UI.HtmlControls.HtmlInputImage |
input type="password" | System.Web.UI.HtmlControls.HtmlInputPassword |
input type="radio" | System.Web.UI.HtmlControls.HtmlInputRadioButton |
input type="reset" | System.Web.UI.HtmlControls.HtmlInputReset |
input type="submit" | System.Web.UI.HtmlControls.HtmlInputSubmit |
textarea | System.Web.UI.HtmlControls.HtmlTextArea |
select | System.Web.UI.HtmlControls.HtmlSelect |
option | System.Web.UI.WebControls.ListItem |
optgroup | System.Web.UI.HtmlControls.HtmlGenericControl |
button | System.Web.UI.HtmlControls.HtmlButton |
label | System.Web.UI.HtmlControls.HtmlGenericControl |
fieldset | System.Web.UI.HtmlControls.HtmlGenericControl |
legent | System.Web.UI.HtmlControls.HtmlGenericControl |
5、表格类标签:
table | System.Web.UI.HtmlControls.HtmlTable |
tr | System.Web.UI.HtmlControls.HtmlTableRow |
td,th | System.Web.UI.HtmlControls.HtmlTableCell |
colgroup,col caption thead,tbody,tfoot |
System.Web.UI.HtmlControls.HtmlGenericControl |
6、特殊:
head,System.Web.UI.Page的一个属性
title,base,link,meta,style,
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。