What are the stages of page life cycle in ASP NET?
This article describes various stages or events of an ASP.NET page life cycle. ASP.NET Page Life Cycle includes events PreInit, Init, InitComplete, OnPreLoad, Load, PostBack, LoadComplete, OnPreRender, OnSaveStateComplete, Render, and UnLoad. Let’s learn ASP.Net page life cycle and how different events are fired during an ASP.NET page life cycle.
What are the events in the page life cycle?
At each stage of the page life cycle, the page raises some events, which could be coded. An event handler is basically a function or subroutine, bound to the event, using declarative attributes such as Onclick or handle. Following are the page life cycle events: PreInit – PreInit is the first event in page life cycle.
What is the life cycle of an application?
The application life cycle has the following stages: User makes a request for accessing application resource, a page. Browser sends this request to the web server. A unified pipeline receives the first request and the following events take place:
What are the steps involved in the processing of an ASP-NET page?
There are series of steps which are followed for the processing of an ASP.Net page. Let’s look at the various stages of the lifecycle of an ASP.Net web page. Page Request – This is when the page is first requested from the server. When the page is requested, the server checks if it is requested for the first time.
ASP.NET Page Life Cycle includes events PreInit, Init, InitComplete, OnPreLoad, Load, PostBack, LoadComplete, OnPreRender, OnSaveStateComplete, Render, and UnLoad.
What is the page life cycle for postbacks?
Some parts of the life cycle occur only when a page is processed as a postback. For postbacks, the page life cycle is the same during a partial-page postback (as when you use an UpdatePanel control) as it is during a full-page postback. The page request occurs before the page life cycle begins.
What is the life cycle of a server control?
Individual ASP.NET server controls have their own life cycle that is similar to the page life cycle. For example, a control’s Init and Load events occur during the corresponding page events. Although both Init and Load recursively occur on each control, they happen in reverse order.