Feb 11, 2010

ASP.Net Page life cycle - simple overview

Page_Init - Initialization of the page
LoadViewState - Loading of the View State
LoadPostData - processing of the Post back data
Page_Load - Loading of Page
RaisePostDataChangedEvent - Notification of PostBack
RaisePostBackEvent - Handling of PostBack Event
Page_PreRender - Pre Rendering of Page
SaveViewState - Saving of view state
Page_Render - Rendering of Page
Page_UnLoad - Unloading of the Page

2 comments:

  1. ASP.Net Page Life Cycle
    =======================

    OnPreInit
    OnInit
    OnInitComplete
    LoadViewState
    OnPreload
    OnLoad
    RaisePostBackEvent
    OnLoadComplete
    OnPreRender
    OnPreRenderComplete
    SaveViewState
    OnRender
    OnUnload

    ReplyDelete
  2. About Tracing
    =============

    - Tracing is used to monitor the execution of ASP.Net application
    - Page Level Tracing and Application Level Tracing
    - Page Level Tracing - By adding trace="true" to Page tag.
    <%@Page Language="C#" Trace="true" TraceMode = "SortByCategory" Inherits="System.Web.UI.Page" CodeFile="Default.aspx.cs" %>
    SortByCategory
    SortByTime - used to see the methods which takes most CPU time
    -Application Level tracing - by adding in web.config file


    - Trace.axd is used to get all the requests trace information
    - System.Diagnostics



    Trace vs Debug
    ==============

    - Trace class and Debug class both are in System.Diagnostics namespace
    - Debug class for debug builds and trace class for debug and release builds.

    ReplyDelete