ASP.NET Web Server Controls
Web server controls are special ASP.NET tags understood by the server.
Web server control
Like HTML server controls, Web server controls are also created on the server, and they also need runat = "server" attribute to take effect. However, Web server controls do not need to map any existing HTML elements and they may represent more complex elements.
Create a Web server control syntax is:
<asp:control_name id="some_id" runat="server" />
Web 服务器控件 | 描述 |
---|---|
AdRotator | 显示一个图形序列 |
Button | 显示下压按钮 |
Calendar | 显示日历 |
CalendarDay | calendar 控件中的一天 |
CheckBox | 显示复选框 |
CheckBoxList | 创建多选的复选框组 |
DataGrid | 显示 grid 中数据源的字段 |
DataList | 通过使用模版显示数据源中的项目 |
DropDownList | 创建下拉列表 |
HyperLink | 创建超链接 |
Image | 显示图像 |
ImageButton | 显示可点击的图像 |
Label | 显示可编程的静态内容(使您对其内容应用样式) |
LinkButton | 创建超链接按钮 |
ListBox | 创建单选或多选的下拉列表 |
ListItem | 创建列表中的一个项目 |
Literal | 显示可编程的静态内容(无法使您对其内容应用样式) |
Panel | 为其他控件提供容器 |
PlaceHolder | 为由代码添加的控件预留空间 |
RadioButton | 创建单选按钮 |
RadioButtonList | 创建单选按钮组 |
BulletedList | 创建项目符号格式的列表 |
Repeater | 显示绑定到控件的项目的重复列表 |
Style | 设置控件的样式 |
Table | 创建表格 |
TableCell | 创建表格单元格 |
TableRow | 创建表格行 |
TextBox | 创建文本框 |
Xml | 显示 XML 文件或 XSL 转换的结果 |