Lifecycle Understanding of Page and Control

Lifecycle understanding of Page and User Control

Aspect and importance of the life cycle is very important. In case we don’t have correct understanding on the events life cycle we can encounter the below questions easily.

I have an aspx and inside it an ascx. From a short testing I see the PageLoad of the aspx is called before the PageLoad of the user-Control but the opposite is true for OnInit??

I also suffered a lot during writing code, and then I went through many articles in order to get the answer of above question. Please find below my understanding.

Please find below the events details regarding the same:

Page Events Name User Control Event Name
PreInit -
Init Init
InitComplete -
PreLoad -
Load Load
LoadComplete -
PreRender PreRender
PreRenderComplete -
SaveStateComplete -
RenderControl RenderControl
Render -
Unload Unload
Dispose Dispose

Anyone can refer to the below link for event details:

Ebook Download
View all
Learn
View all