
第2讲Web控件 VB.NET ADO.NET ■1服务器控件 Web数据库 ■2HTML控件 设计与应用 ■3Web服务器控件 ■4Web服务器验证控件 ASP.NET Visual Studio.NET ■5服务器控件绑定
◼ 1 服务器控件 ◼ 2 HTML控件 ◼ 3 Web服务器控件 ◼ 4 Web服务器验证控件 ◼ 5 服务器控件绑定 Use Visual Studio .NET ASP.NET Visual Studio.NET ADO.NET VB.NET Web数据库 设计与应用 第2讲 Web控件

1服务器控件 ■什么是服务器控件 ·在服务器上运行的组件 。封装了用户界面或其他功能 ■两种服务器控件 ·HTML服务器控件 ·Web服务器控件
1 服务器控件 ◼ 什么是服务器控件 ⚫ 在服务器上运行的组件 ⚫ 封装了用户界面或其他功能 ◼ 两种服务器控件 ⚫ HTML 服务器控件 ⚫ Web服务器控件

两种服务器控件 ■Web服务器控件: ·专为ASP.NET创建 ·根据Wb窗体标签可以从工具箱中获得 ■HTML服务器控件: 。HTML控件以服务器控件的方式运行 ·根据HTML标签可以从工具箱中获得
两种服务器控件 ◼ Web 服务器控件: ⚫ 专为 ASP.NET 创建 ⚫ 根据 Web 窗体标签可以从工具箱中获得 ◼ HTML 服务器控件: ⚫ HTML 控件以服务器控件的方式运行 ⚫ 根据 HTML 标签可以从工具箱中获得

第2讲Web控件 VB.NET ADO.NET ■1服务器控件 Web数据库 ■2HTML控件 设计与应用 ■3Web服务器控件 ■4Web服务器验证控件 ASP.NET Visual Studio.NET ■5服务器控件绑定
Use Visual Studio .NET ASP.NET Visual Studio.NET ADO.NET VB.NET Web数据库 设计与应用 ◼ 1 服务器控件 ◼ 2 HTML控件 ◼ 3 Web服务器控件 ◼ 4 Web服务器验证控件 ◼ 5 服务器控件绑定 第2讲 Web控件

2HTML控件 工具箱 ■传统的HTML控件 数据 Web窗体 ■HTML服务器控件 组件 HTML 。命名空间: 具指针 System.Web.UI.HtmlControls A Label Button ●Runat=“server' Reset Button Submit Button Tabi Text Field Text Area Password Field Checkbox Radio Button 国Table 目Flow Layout Panel 常规 包服务器资源管理器决工具箱】
2 HTML 控件 ◼ 传统的HTML控件 ◼ HTML服务器控件 ⚫ 命名空间: System.Web.UI.HtmlControls ⚫ Runat=“server

HTML服务器控件的层次 System.Object System.Web.Ul.Control System.Web.UI.HtmlControls HtmllnputControl HtmicontainerControl HtmlinputButton HtmlAnchor HtmllnputCheckBox HtmlButton HtmllnputHidden HtmiGenericControl HtmllnputRadioButton HtmITable HtmITableCell HtmiTableRow HtmITextArea
HTML服务器控件的层次

第2讲Web控件 VB.NET ADO.NET ■1服务器控件 Web数据库 ■2HTML控件 设计与应用 ■3Web服务器控件 ■4Web服务器验证控件 ASP.NET Visual Studio.NET ■5服务器控件绑定
Use Visual Studio .NET ASP.NET Visual Studio.NET ADO.NET VB.NET Web数据库 设计与应用 ◼ 1 服务器控件 ◼ 2 HTML控件 ◼ 3 Web服务器控件 ◼ 4 Web服务器验证控件 ◼ 5 服务器控件绑定 第2讲 Web控件

3Web服务器控件 工具箱 数据 ■命名空间: web窗体 System.Web.Ul.WebControls 指针 A Label ■前缀 bi TextBox ab]Button ab]LinkButton ■Runat=“'server” ImageButton A HyperLink DropDownList G司DataList Repeater CheckBox CheckBoxList 组件 HTML 剪贴板循环 常规 跑服务器资源管理器工具箱
3 Web服务器控件 ◼ 命名空间: System.Web.UI.WebControls ◼ 前缀 ◼ Runat=“server

Web服务器控件的层次 5 ystem.0b时et System.Web.Ul.Control System.Web.Ul.WebControls WebControl Repeater☐ Button AdRotator☐ RadioButton Calendar☐ -DataGrid☐ HyperLink Image ValidationSummary CheckBoxList DropDownList☐ ListBox -Panel -RadioButtonList Table RangeValidator TableCell RegularExpressionValidator TableRow TextBox Legend Concrete Class Abstract Class
Web服务器控件的层次

基本Web服务器控件 ■1.Literal控件 。2.Label控件 ● 。3.TextBox:控件
基本Web服务器控件 ◼ 1. Literal控件 ⚫ ⚫ 2. Label控件 ⚫ <asp:Label runat=“server” Text=“ ”></asp:Label> ⚫ 3. TextBox控件 ⚫ <asp:TextBox runat="server" Text="TextBox1"></asp:TextBox>