服务器控件类与HTML标签之间的对应关系
2016-07-05 22:54
411 查看
通过查看System.Web.UI.HtmlControls命名空间,可以发现,很多HTML对应的标签都可以通过添加runat=”server”属性转化为服务器控件,比如<table>会转化为HtmlTable对象,但像<input >标签可以通过type属性对应不同的服务器对象。当html内的标签没有和上图中的服务器控件匹配时,所有不匹配的html标签都会通过添加runat=”server”转化为HtmlGenericControl服务器控件。下面是对应的服务器控件类与HTML标签之间的对应关系:
HTML Tag | HTML Server Control |
<form> | HtmlForm |
<input type="text"> | HtmlInputText |
<input type="password"> | HtmlInputText |
<input type="radio"> | HtmlInputRadioButton |
<input type="checkbox"> | HtmlInputCheckBox |
<input type="submit"> | HtmlInputButton |
<input type="hidden"> | HtmlInputHidden |
<input type="button"> | HtmlInputButton |
<input type="image"> | HtmlInputImage |
<input type="file"> | HtmlInputFile |
<button> | HtmlButton |
<select> | HtmlSelect |
<textarea> | HtmlTextArea |
<img> | HtmlImage |
<a> | HtmlAnchor |
<table> | HtmlTable |
<tr> | HtmlTableRow |
<td> | HtmlTableCell |
其他标签eg:<div> | HtmlGenericControl |
相关文章推荐
- HTML-元素&属性
- html 语法
- XHTML 表单
- html中清除浮动问题
- HTML--比较实用的小例子
- HTML笔记(元素分类)
- canvas底部有空白部分
- html 页面清浏览器缓存
- htmlparser API
- kindeditor html代码过滤 首发
- html form表单reset
- 在编写html文件当中submit 和 button有什么区别
- 常见浏览器兼容性问题与解决方案
- HTML过滤器 - XSS Fucker 20160701
- HTML特殊符号对照表
- 在Web.xml 内配置浏览器解析html的编码格式
- HTML中的布局方式:absolute、relative、fixed、static
- 在DOM不用拼html代码变数据的技巧,ajax分页案例
- HTML第一篇
- swiper的基础使用(十五)