2
Reply

what is event in .NET life cycle ?

Praveen Moosad

Praveen Moosad

15y
12.1k
0
Reply

    Event is an incident. It is something that happens at a given place and time.
    For every request to .aspx page the ASP.NET work processor will create a new instance of the corresponding page class
    object, once the request is executed the object of page class is destroyed automatically, the page object life cycle is controlled by its page life cycle events those are:

    1 page_Init
    2 page_Load
    3 page_Prerender
    4 Page_Unload

    Page_init:

    The Page_Init event is the first to occur when an ASP.NET page is executed.This is where you perform any initialization steps that you need to set up or create instances of server controls. This event fires only the first time the page is loaded. When you postback to any page, the Page_Init event doesn't fire.


    Page_Load:

    The Page_Load event fires each time the page loads, postback or not. This event occurs only when all the objects on the page have been created and are available for use.

    Page_Prerender:

    After page executed and before rendering the output values to the the requested browser this event executes

    Page_Unload:

    This event occurs for each control and then for the page when the page unloads.

    four event are thier in .NET life cycle are

    1:Page Init

    2: Page Load

    3: Page Perender

    4 : Page Unload