- 1
- 0
- 约1.65万字
- 约 51页
- 2018-05-05 发布于福建
- 举报
视觉感很强微软.net幻灯片蓝色ppt模板
ASP.NET Pages can include… Code Blocks Static Text Control Tags HTML Tags Directives Data Binding Expressions Render blocks %= … % Server comments %-- --% Client script Creating Web Forms What Are Web Forms? What Are Server Controls? Types of Server Controls How Do Server Controls Work? Control event processing Demo What Are Web Forms? .aspx extension @Page Directive Framework Is an Object Model Denoted by the runat=server Attribute Contain Client-side and Server-side Code Contain HTML and Server Controls Form runat=server /Form %@ Page Language=“c# % Why Web Forms? New control-based, event-driven execution model for Web UI VB for the Web Cleanly encapsulated functionality Much less code required than ASP Executed via CLR as native code VB, C#, Jscript Faster execution than ASP Web Forms use .ASPX extension Runs side-by-side with ASP applications What Are Server Controls? Server-programmable Objects Denoted by Tag with the runat = server Attribute Encapsulate Both Behavior and Rendering Fully Declarative Render Different HTML to Support Multiple Browsers or other Web Clients Types of Server Controls HTML Controls Exist within the System.Web.UI.HtmlControls namespace Web Controls Exist within the System.Web.UI.WebControls namespace input type=text id=txtName runat=server span id=spnStarter runat=server starter/span asp:TextBox id=txtName runat=server Text=[Entry Keywords]/ Html ControlDemo What Are Web Controls? Web Controls Intrinsic controls asp:list, asp:button, asp:checkbox, asp:table Input Validation controlsasp:RangeValidator, asp:RegularExpressionValidator Rich controlsasp:calendar, asp:adrotator List-bound controlsasp: datagrid, asp:repeater, asp:datalist How Do Server Controls Work? Declared with runat=server Attribute When the ASP.NET Page is Executed: Creates action and method attributes of form Adds unique id and name attributes to controls Adds value attribute to controls Adds a hidden control to the form to save view state information
原创力文档

文档评论(0)