You must Sign In to post a response.
  • Category: ASP.NET

    Life cycle of asp.net

    hello sir can u please explain me the life cycle in each phase what exactly do in short line

    and my another question is how can i integrate android app using the asp.net web service
  • #747606
    Page life cycle is,


    Request --> Start --> Init -->Load --> postback -->Rendering -->Unload

    Page request
    The page request occurs before the page life cycle begins. When the page is requested by a user, ASP.NET determines whether the page needs to be parsed and compiled (therefore beginning the life of a page), or whether a cached version of the page can be sent in response without running the page.

    Start
    In the start stage, page properties such as Request and Response are set. At this stage, the page also determines whether the request is a postback or a new request and sets the IsPostBack property. The page also sets the UICulture property.

    Initialization
    During page initialization, controls on the page are available and each control's UniqueID property is set. A master page and themes are also applied to the page if applicable. If the current request is a postback, the postback data has not yet been loaded and control property values have not been restored to the values from view state.

    Load
    During load, if the current request is a postback, control properties are loaded with information recovered from view state and control state.

    Postback event handling
    If the request is a postback, control event handlers are called. After that, the Validate method of all validator controls is called, which sets the IsValid property of individual validator controls and of the page.

    Rendering
    Before rendering, view state is saved for the page and all controls. During the rendering stage, the page calls the Render method for each control, providing a text writer that writes its output to the OutputStream object of the page's Response property.

    Unload
    The Unload event is raised after the page has been fully rendered, sent to the client, and is ready to be discarded. At this point, page properties such as Response and Request are unloaded and cleanup is performed.

  • #747608
    ASP.NET page has very interesting lifecycle, we will see each phase below
    1. Page request
    This is the early phase before starting of life cycle in which the page is requested by a user, ASP.NET determines whether the page needs to be parsed and compiled
    2. Page initialization (Init)
    DSuring this phase controls on the page are available and each control's UniqueID property is set.
    3. Load
    if the current request is a postback, control properties are loaded with information recovered from view state and control state
    4. Render
    Before rendering, view state is saved for the page and all controls.
    5. Unload
    Unload is called after the page has been fully rendered, sent to the client, and is ready to be discarded.

    To call android api in .net you need to go through following link
    http://curah.microsoft.com/69302/android-development-with-microsoft-visual-studio

    Thanks
    Koolprasd2003
    Editor, DotNetSpider MVM
    Microsoft MVP 2014 [ASP.NET/IIS]

  • #747609
    Please visit following url.

    http://aspdotnetcode.blogspot.in/search/label/Sql%20Server%20Interview%20Questions

    Thanks & Regards
    Santosh Singh
    Microsoft Certified Technology Specialist.
    Email:santosh0683@gmail.com
    http://varanasitravel.in

    "In order to succeed you must fail, so that you know what not to do the next time."

  • #747617
    Below are the list and descriptions of page life cycle of ASP.NET-

    1. PreInt:This is the entry point of the ASP.NET page life cycle. it is the pre-initialization, so you have access to the page before it is initialized.
    2.Init: This event fires when all controls on the page have been initialized and skin settings have been applied.
    3.InitComplete: This event fires once all page and control initialization complete.
    4.Load:This is the first event in the page life cycle where everything is loaded.
    5.LoadComplete: This event is fired when the page is completely loaded.
    6.PreRender: This is the final stop in the page load cycle where you can make changes to page contents or controls.
    7.PreRenderComplete: This event is fired when PreRender is complete.
    8.Unload: This event fires for each control and then the page itself. It is fired when the HTML for the page is fully rendered.

    And for the question "how can i integrate android app using the asp.net web service", i would suggest you to read the below article-
    http://www.codeproject.com/Articles/304302/Calling-Asp-Net-Webservice-ASMX-From-an-Android-Ap

    Hope this will help you !!

    Thanks,
    Ashutosh Jha
    http://tricksroad.com

  • #747635
    Hi,

    Below code porject URL has enough information. Please check it

    http://www.codeproject.com/Articles/667596/ASP-NET-Life-Cycle-Overview

    Thanks,
    Vetri

  • #747663
    In terms of the Event and the respective method, please find the details below for an ASP.NET page



    Page Initialization Page_Init

    View State Loading LoadViewState

    Postback data processing LoadPostData

    Page Loading Page_Load

    PostBack Change Notification RaisePostDataChangedEvent

    PostBack Event Handling RaisePostBackEvent

    Page Pre Rendering Phase Page_PreRender

    View State Saving SaveViewState

    Page Rendering Page_Render

    Page Unloading Page_UnLoad

    Thanks & Regards
    Anil Kumar Pandey
    Microsoft MVP, DNS MVM


  • Sign In to post your comments