Beginning ASP.NET (Part 3).NET 2.0 Core Libraries Tuc Goodwin.

Slides:



Advertisements
Similar presentations
Unit 02. ASP.NET Introduction HTML & Server controls Postbacks Page Lifecycle.
Advertisements

ASP.NET Page Life Cycle Dev Basics Series Jay Harris.
Working with ASP Pages. Slide 2 The Tag (1) Remember that most ASP.NET pages contain a single tag with the runat attribute set It’s possible to have multiple.
Asp.NET Core Server Controls. Slide 2 Lecture Overview Understanding the types of ASP.NET controls HTML controls ASP.NET (Web) controls.
Anatomy of an ASP.NET Page. Slide 2 My Version of the Big Picture (1) ASP Worker (Engine) Your application Runs Server Other applications User 1User 2.
1 Chapter 12 Working With Access 2000 on the Internet.
Chapter 12: ADO.NET and ASP.NET Programming with Microsoft Visual Basic.NET, Second Edition.
Web Platform Introduction With a focus on “free” Mike Taulty Developer & Platform Group Microsoft Ltd
Understand Events and Control Page Flow Web Development Fundamentals LESSON 1.4.
COS 381 Day 23. © 2006 Pearson Addison-Wesley. All rights reserved Agenda Capstone progress report Overdue –Only received 1 out of 6 Capstone projects.
Microsoft ASP.NET AJAX - AJAX as it has to be Presented by : Rana Vijayasimha Nalla CSCE Grad Student.
Performed by:Gidi Getter Svetlana Klinovsky Supervised by:Viktor Kulikov 08/03/2009.
 Mark Friedman Architect Developer Division Microsoft Corporation.
Microsoft ® Official Course Monitoring and Troubleshooting Custom SharePoint Solutions SharePoint Practice Microsoft SharePoint 2013.
Christopher M. Pascucci Basic Structural Concepts of.NET Browser – Server Interaction.
ASP.NET
Web Form Fundamentals MacDonald Ch. 5 MIS 324 MIS 324 Professor Sandvig Professor Sandvig.
Windows.Net Programming Series Preview. Course Schedule CourseDate Microsoft.Net Fundamentals 01/13/2014 Microsoft Windows/Web Fundamentals 01/20/2014.
OOP and Web Applications Michael Juřek Architect Evangelist Microsoft Corporation.
Ch6:creating consistent looking web sites. Master pages Master page defines a combination of fixed content and content place holder to hold the web page(.aspx)
Dr. Azeddine Chikh IS444: Modern tools for applications development.
.Net is a collection of libraries, templates and services designed to make programming applications of all kinds, easier, more flexible (multi platform),
February 16, Aaron Cuffman Andy Nagle Adam Schultz Web Site.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
ASP.NET  ASP.NET is a web development platform, which provides a programming model, a comprehensive software infrastructure and various services required.
Creating Web Applications Using ASP.NET Chapter Microsoft Visual Basic.NET: Reloaded 1.
The West Wind Web Connection 5.0 Web Control Framework The West Wind Web Connection 5.0 Web Control Framework An overview of the new Web Control Framework.
ASP.NET Controls. Slide 2 Lecture Overview Identify the types of controls supported by ASP.NET and the differences between them.
Murach’s ASP.NET 4.0/VB, C1© 2006, Mike Murach & Associates, Inc.Slide 1.
Caching Chapter 12. Caching For high-performance apps Caching: storing frequently-used items in memory –Accessed more quickly Cached Web Form bypasses:
Overview of Previous Lesson(s) Over View  SDI programs  The Application Wizard can generate single-document interface (SDI) applications that work.
Server Control Tips & Tricks Presented by: Patrick Hynds Microsoft Regional Director CriticalSites CTO MCSD, MCSE+I, MCDBA, MCSA, MCP+Site Builder, MCT.
ASP.NET OPTIMIZATION. Why Optimize? $$$ Whether you build applications for customers or not, enhanced applications save money.
Database Handling, Sessions, and AJAX. Post Back ASP.NET Functionality The IsPostBack method in ASP.NET is similar to the BlackBerry.refresh method –IsPostBack.
Anatomy of an ASP.NET Page. Slide 2 Compiling an ASP.NET Page An ASP.NET page is compiled when it is rendered for the first time A page is compiled to.
PV247 – Development I Introduction to ASP.NET and related technologies.
Module 1: Working with ASP.NET. Overview Introducing ASP.NET Creating Web Forms Adding ASP.NET Code to a Page Handling Page Events Discussion: ASP vs.
WEB428 ASP.NET 2.0: Advanced Server Controls and Web Parts with ASP.NET 2.0 Andres Sanabria Program Manager Web Platform and Tools Team Microsoft Corporation.
BIT 285: ( Web) Application Programming Lecture 06: Thursday, January 22, 2015 Page Object, The Lifetime of a Web Application, Application State and Session.
Getting Started with ASP.NET MVC BRIJ BHUSHAN MISHRA.
Sofia, Bulgaria | 9-10 October ASP.NET: Developing Portal UI With Web Parts Goksin Bakir Yage Ltd Microsoft Regional Director, MEA Goksin Bakir Yage Ltd.
ASP.NET 4 Unleashed Chapter 1. .aspx page: contains C# script and HTML code including tags. Listing 1.1 FirstPage.aspx.
Introduction Selenium IDE is a Firefox extension that allows you to record, edit, and debug tests for HTML Easy record and playback Intelligent field selection.
Understanding Web Applications Lesson 4. Objective Domain Matrix Skills/ConceptsMTA Exam Objectives Understanding Web Page Development Understand Web.
ASP.NET User Controls. User Controls In addition to using Web server controls in your ASP.NET Web pages, you can create your own custom, reusable controls.
Asp.NET Core Server Controls. Slide 2 Lecture Overview Understanding the types of ASP.NET controls HTML controls ASP.NET (Web) controls.
Overview of Previous Lesson(s) Over View  ASP is a technology that enables scripts in web pages to be executed by an Internet server.  ASP.NET is a.
Svetlin Nakov Telerik Corporation
Text INTRODUCTION TO ASP.NET. InterComm Campaign Guidelines CONFIDENTIAL Simply Server side language Simplified page development model Modular, well-factored,
PostBack  When an initial request for a page (a Web Form) is received by ASP.NET, it locates and loads the requested Web Form (and if necessary compiles.
Building Custom Controls with ASP.NET and the Microsoft ®.NET Framework Rames Gantanant Microsoft Regional Director, Thailand
05 | Integrating JavaScript and MVC 4 Jon Galloway | Tech Evangelist Christopher Harrison | Head Geek.
Event Handling & Viewstate CS 351 Ed Gellenbeck. Today Review of Web Forms ASP.NET Object Hierarchy Events State Management Page State Session State Application.
 ASP.NET provides an event based programming model that simplifies web programming  All GUI applications are incomplete without enabling actions  These.
Sergey Sidorov PhD student, computer software chair Computer Science department.
ASP.NET Architecture Mike Taulty Developer & Platform Group Microsoft Ltd
//liveVirtualacademy2011/ What’s New for ASP.NET 4.5 and Web Development in Visual Studio 11 Developer Preview Γιώργος Καπνιάς MVP, MCT, MCDP, MCDBA, MCTS,
ASP.NET State Management Overview Prepared By Manish Kumar Aery(IM66) Department of computer Application IET Bhaddal (Ropar)
ASP.NET Overview Brian Hitney Developer Evangelist Microsoft Corporation
111 State Management Beginning ASP.NET in C# and VB Chapter 4 Pages
Chapter 2 Creating Website with Web Forms. Objectives Understand the different project types and templates when building ASP.NET web sites. The different.
Jim Fawcett CSE686 – Internet Programming Spring 2014
ASP.NET Forms.
Introduction to .NET Framework
Introduction to ASP.NET 2.0
JavaScript Introduction
Anatomy of an ASP.NET Page
ASP.NET
ASP.NET 4.0 State Management Improvements – Deep Dive
ASP.NET Imran Rashid CTO at ManiWeber Technologies.
Presentation transcript:

Beginning ASP.NET (Part 3).NET 2.0 Core Libraries Tuc Goodwin

Agenda Overview of ASP.NET Events Quick Demo Strings / Formatted or Otherwise Quick Demo Review Questions

Overview of ASP.NET Events SILVER - An easy way to remember asp.net lifecycle S – Start I – Initialize L – Load V – Validate E – Event Handling R – Render Adapted from the Code Project article at

1. Start This is where page properties such as Request, Response, IsPostBack and UICulture are set. If you need to access or override behavior for this step, use the PreInit method to create or re-create dynamic controls, set a master page or theme or read or set profile property values. Note: If the request is a postback, the values of the controls have not yet been restored from view state. If you set a control property at this stage, its value might be overwritten in the next event.

2. Initialize This stage is where themes are applied, and unique ids are generated and set for controls. You have access to the Init, InitComplete and PreLoad methods in this stage. Microsoft's recommended usage for these methods is as follows: Init – This event is raised after all controls have been initialized and any skin settings have been applied. Use this event to read or initialize control properties. InitComplete – This event is raised by the Page object. Use this event for processing tasks that require all initialization be complete. PreLoad - Use this event if you need to perform processing on your page or control before the Load event. After the Page raises this event, it loads view state for itself and all controls, and then processes any postback data included with the Request instance.

3. Load Probably the most utilized by developers. In this stage controls are loaded with information retrieved from view and control states. The OnLoad is the event method that occurs during this stage. This is where you set properties for all of the server controls on your page, request query strings, and establish database connections.

4. Validate If there are controls that require validation, they are validated here and you can now check the IsValid property of the control. The event associated with this is Validate, which contains one overloaded method that accepts a validation group string. The overloaded method instructs the controls in the specified group to validate.

5. Event Handling The event handling for server controls occurs during this stage. This means that events such as Click, SelectedIndexChanged, etc are applied to your server controls, and, in the case of a postback, these event handlers are fired by the control.

5. Event Handling (Part II) The accessible events of note in this stage are as follows: LoadComplete – At this step, all of the controls for the page have been loaded. PreRender – A few things of import happen here. First, the page object will call EnsureChildControls for each control, and finally for the page. Additionally, any data bound control that has a DataSourceID set will call its DataBind method. It is important to note that the PreRender event occurs for each control on the page. At the conclusion of this event, ViewState will be saved for the page and all of the controls. SaveStateComplete – ViewState has been saved. If you have actions that do not require changes to controls but require ViewState to have been saved, you can handle the SaveStateComplete event.

6. Render Render is not really an event. The page object calls this method on each control, which in turn writes out the HTML markup for the control to the browser. For More information see Microsoft's Developing Custom ASP.NET Server Controls. (

7. Unload This final event occurs first for each control, then, finally, for the page. At this point, all controls have been rendered to the output stream and cannot be changed. During this event any attempt to access the response stream will result in an exception being thrown. This event is primarily for cleanup routines such as closing open database connections, and open file streams, or, event logging and other tasks.

Quick Demo I will show several events being fired… I will show the Trace Page level attribute…

Strings / Formatted or Otherwise Formatting strings is a very powerful tool. It allows you to concatenate strings, conversions and provide super formatting easily string.Format("{0:c}",100);//$ string.Format("{0:e}", 32768); // e_004 string.Format("{0:f}", ); // string.Format("{0:g}"32768); //32768 string.Format("{0:n}", 32768); //32,768 string.Format("{0:p}", 32768); //32,768%

Review What did we cover?

Questions

Next Month DateTitle 3/14/2009Beginning ASP.NET (Part 4) Consuming WCF Services 4/11/2009LINQ 5/9/2009Lessons Learned 6/13/2009Building the web Layer using ASP.NET AJAX 7/11/2009Building the Data and Business Layers using.NET 3.5 (Part 1) 8/8/2009Building the Data and Business Layers using.NET 3.5 (Part 2) 9/12/2009ASP.NET Deployment