Friday, July 15, 2011

Life Cycle of a WebPart

1. OnInit - Handles the initialization of the webpart

2. OnLoad - Handles the load event

3. CreateChildControls - Creates all the child controls if present

4. EnsureChildControls - Ensures that the CreateChildControls method has been executed

5. OnPreRender - Handles tasks such as data loading etc that need to be completed before the controls are rendered

6. Page.PreRenderComplete - it is fired once the OnPreRender gets executed

7. Render - Renders the entire control

8. RenderContents - Renders the contents

No comments:

Post a Comment