aspnet培训

上传人:简****9 文档编号:99364312 上传时间:2019-09-18 格式:PPT 页数:93 大小:1.09MB
返回 下载 相关 举报
aspnet培训_第1页
第1页 / 共93页
aspnet培训_第2页
第2页 / 共93页
aspnet培训_第3页
第3页 / 共93页
aspnet培训_第4页
第4页 / 共93页
aspnet培训_第5页
第5页 / 共93页
点击查看更多>>
资源描述

《aspnet培训》由会员分享,可在线阅读,更多相关《aspnet培训(93页珍藏版)》请在金锄头文库上搜索。

1、ASP.NET Development,Agenda,What is ASP.NET? Web Forms Server Controls & User Controls Databinding ASP.NET Pages ASP.NET Caching ASP.NET Configuration ASP.NET Security ASP.NET Applications Deploying ASP.NET Web Applications,What is ASP.NET?,Microsofts platform for building Web Applications Part of th

2、e .NET Framework Server Side Technology,.NET Framework,Base Class Library,Common Language Specification,Common Language Runtime,ADO.NET: Data and XML,VB,C+,C#,Visual Studio.NET,ASP.NET: Web Services and Web Forms,JScript,Windows Forms,ASP.NET,Base Class Library,Common Language Specification,Common L

3、anguage Runtime,VB,C+,C#,Visual Studio.NET,ASP.NET: Web Services and Web Forms,JScript,Windows Forms,ADO.NET: Data and XML,ASP.NET Features,ASPX, ASP Side by Side Simplified Programming Model Control-based, event-driven execution model Code Behind Pages Powerful Controls Powerful Data Access Better

4、Performance Executed via CLR as native code,ASP.NET Feature,Simplified Browser Support Simplified Form Validation Better Session Management Caching Security Web Services Simplified Deployment,ASP.NET Execution Model,ASPX,.ASPX,ASP.NET Execution Model,.ASPX,Compiled,ASP.NET Execution Model,.ASPX,Comp

5、iled,ASP.NET Execution Model,.ASPX,Compiled,.ASPX,Compiled,ASP.NET Execution Model,demo,Agenda,What is ASP.NET? Web Forms Server Controls & User Controls Databinding ASP.NET Pages ASP.NET Caching ASP.NET Configuration ASP.NET Security ASP.NET Applications Deploying ASP.NET Web Applications,Web Form

6、Pages Part Declarative, Part Code,Declarative “tags” HTML, server controls, static text Server Side Code Great separation between code and markup,Form1.aspx,code,Form1.aspx,code,Form1.vb,single file,separate files (“code-behind”),A Page Can Include,Runtime Compilation,ASP.NET Page Life Cycle,Similar

7、 to Microsoft Win32 application Events raised as page created Form_Initialize() - Page_Init() Form_Load() - Page_Load() Form_Activate() - Page_PreRender() Form_Unload() - Page_Unload(),Simple ASP.NET Page,demo,Agenda,What is ASP.NET? Web Forms Server Controls & User Controls Databinding ASP.NET Page

8、s ASP.NET Caching ASP.NET Configuration ASP.NET Security ASP.NET Applications Deploying ASP.NET Web Applications,ASP.NET Server Controls,Server controls encapsulate Rendering Behavior Generate markup that is sent to the client DHTML, HTML 3.2, WML, etc. Offer up dynamic experience Process input sent

9、 from client Bind to data Fire server side events for notifications,Standard ASP.NET Controls,Web Controls Render client-targeted HTML and script Consistent, strongly-typed object model Some render as single HTML tags: Button, TextBox, DropDownList Some render richer HTML + script: DataGrid, Calenda

10、r, Validators Html Controls Map 1:1 with HTML tags,ASP.NET Server Controls, Runat Enables Server Side Processing,Required validator control Range validator control Compare validator control Regular expression validator Custom validator control,ASP.NET Validation Control,ASP.NET Server Control,demo,C

11、ontrol Event Processing,Events are: Triggered on the client Handled in server code Requires a postback to the same page Relies on State Management,Handling Control Events,Wire up the handler on the tag: Event handler code: Sub btn1_Click(s as Object,e as EventArgs) Message.Text = “Button1 clicked“ E

12、nd Sub VS.NET,Page/Control Event Execution,Page_Load,Page_Unload,Textbox1_Changed,Button1_Click,(on PostBack),1. Change Events,2. Action Events,Page is loaded, control hierarchy initialized,Page is disposed,Control hierarchy is rendered,Page_Load Details,Page_Load fires on every request Test Page.Is

13、PostBack to execute conditional logic Example: Sub Page_Load(s As Object,e As EventArgs) If Not Page.IsPostBack Then executes only on initial page load Message.Text = “initial value“ End If End Sub,State Management,ViewState helps restore control to its previous state Implemented as a hidden form fi

14、eld Disable via: EnableViewState=false SessionState used to store data associated with the current session,Postback Forms,demo,User Controls,Server controls, authored like pages Enable full encapsulation Supports nested controls Separate code namespace Separate code language Great way to partition w

15、ork Great way to reuse work across multiple pages and applications, Directive,Registers User Control for use on a Web Forms page: ,Exposing An Object Model,User controls expose an object model Properties, Fields, Events, Methods Example: public string Color get set ,Creating a User Control,demo,Agen

16、da,What is ASP.NET? Web Forms Server Controls & User Controls Databinding ASP.NET Pages ASP.NET Caching ASP.NET Configuration ASP.NET Security ASP.NET Applications Deploying ASP.NET Web Applications,Web Forms Data Binding,Provides a simple, declarative way to bind Web UI elements to data “Simple” binding to a single property “List” binding to a data source DataGrid, DropDownList, etc. Huge variety of data sources su

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 商业/管理/HR > 管理学资料

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号