WebPart Life Cycle
1. OnInit: event used to create controls of web part 2. OnLoad: 3. CreateChildControls: event used to set properties and default values to controls collection If the page is being rendered for the first time the method generally occurs after the OnLoad event. If it is Postback, It is called before OnLoad event. EnsureChildControls: It checks to see if the CreateChildControls method has yet been called, and if it has not, calls it. 4. LoadViewState: The view state of the web part is populated over here. 5. OnPreRender: event used to set up business logic related work and in this routine controls value kept by viewstate 6. Render: event creates the HTML that appears in the body of the Web Part. 7. OnUnload: 8. Dispose: