What are the different life cycle events that WebPart goes through?

 Posted by ArticlesMaint on 9/24/2009 | Category: SharePoint Interview questions | Views: 3900

 A ‘WebPart’ control goes through various events and has a typical life cycle.

OnInit: - This is the initialization event and is the first event to occur.

OnLoad: - The load event.

CreateChildControls: - When any child controls are added to a composite control this event fires.

EnsureChildControls: - This event makes sure that ‘CreateChildControls’ fires.

OnPreRender: - This fires just before the render event.

Page.PreRenderComplete :- When all controls have executed the ‘OnPreRender’ event this event fires.

Render: - Render the full control.

RenderContents: - Renders the contents of the control only.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response