Asp.net page lifecycle
Upcoming SlideShare
Loading in...5
×
 

Asp.net page lifecycle

on

  • 229 views

ASP.NET page life cycle's stages and fired events in each stages.

ASP.NET page life cycle's stages and fired events in each stages.

Statistics

Views

Total Views
229
Views on SlideShare
227
Embed Views
2

Actions

Likes
0
Downloads
19
Comments
0

1 Embed 2

http://www.slideee.com 2

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Asp.net page lifecycle Asp.net page lifecycle Presentation Transcript

  • ASP.NET JUMP START SESSION - 3 Abu Md. Khademul Basher Speaker TechForum, Microsoft Technical Community
  • MY PUBLISHED ARTICLE IN CODE PROJECT  Implementation of MVC Patterns in ASP.NET Web forms Application.  MVC Patterns (Active and Passive Model) and its implementation using ASP.NET Web forms  Easy way to learn the Asp.Net Built in Membership and Role using custom controls with example  Single Page Application performing database CRUD operations using Backbone and ASP.NET Web API  Apply Here Map in Windows Phone HTML5 Apps
  • WINDOWS PHONE APPS
  • CONTENTS  ASP.NET Page Life Cycle
  • ASP.NET PAGE LIFE CYCLE What is page life cycle? When a page is requested by the user the request goes through a series of steps. The periods between the request and response of a page is called Page Life Cycle.  Request- Start of life cycle (send by user).  Response – End of life cycle (send by server).
  • ASP.NET PAGE LIFE CYCLE How to initiate a request? When you type a url in Browser address bar and press enter, the Browser sent a page request to the Server. The sequence diagram of request and response.
  • ASP.NET PAGE LIFE CYCLE HTTP Methods:  GET - Requests data from a specified resource  POST - Submits data to be processed to a specified resource <form method="post" runat="server"> <a href=“http://www.google.com”>Google</a> <input type=“text” value=“”/> <input type=“button” value=“Submit”/> </form>
  • GENERAL PAGE LIFE-CYCLE STAGES When a page is requested, it goes through the following stages. Page request Start The page request occurs before the page life cycle begins. Page initialization Load Validation Postback event handling Rendering Unload In the start step, page properties such as Request and Response are set. During page initialization, controls on the page are available and each control's UniqueID property is set.Control properties are loaded with information recovered from view state and control state. Validate method of all validator controls is called. If the request is a postback, any event handlers are called. During the rendering phase, the page calls the Render method for each control.Unload is called after the page has been fully rendered
  • GENERAL PAGE LIFE-CYCLE STAGES Events rises within each stage of the life cycle and there’s corresponding event handlers are as follows: Page Event Handler Stage PreInit Page_PreInit Page initialization Init Page_Init Page initialization InitComplete Page_InitComplete Page initialization PreLoad Page_PreLoad Load Load Page_Load Load Control events ddlCoungry_SelectedIndex Changed Load LoadComplete Page_LoadComplete Load PreRender Page_PreRender Rendering SaveStateComplete Page_SaveStateComplete Rendering Render (Method) Render Rendering Unload Page_Unload Unload
  • GENERAL PAGE LIFE-CYCLE STAGES…. Flow Chart view of Page Life Cycle. Initialize Method: OnInit No Yes Load View State Process postback data Load method: Onload First Load? First Load? No Yes Handle postback events method: RaisePostBackEvent Prer ender method: OnPreRender Save view state method: SaveViewState Render method: Render Dispose method: Dispose
  • THANK YOU