تم إضافة السؤال من قبل
Syed Kamran Hyder
, Senior UI/UX / Web & Graphic Designer / SharePoint Designer , Saudi Basic Industries Corporation (SABIC)
تاريخ النشر: 2012/12/30
Web Part Life Cycle starts with these terms
On Init- to configure the webpart.
On Load- to load add controls.
Create Child Controls- It is use to create controls and set its property.
Load View State- The view state of the web part is populated over here.
On Pre Render- it is use to change the web part properties.
Rente rContents- it generate the output in html.
Dispose- to free the memory.
On Page Load
Constructor
OnInit
OnLoad
ConnectionConsumer method is called if web part is connectable (sets the connection providers interface in the webpart)
CreateChildControls
OnPreRender (if your web part is connectable you would typically call the connection provider here to retrieve data)
SaveViewState
Render
RenderChildren
RenderContents
On 1st Postback
(PostBack click handler sets ViewState via public Property)
Constructor
OnInit
CreateChildControls
OnLoad
PostBack click handling
ConnectionConsumer method is called if web part is connectable (sets the connection providers interface in the webpart)
OnPreRender (if your web part is connectable you would typically call the connection provider here to retrieve data)
SaveViewState
Render
RenderChildren
RenderContents
On 2nd Postback
(PostBack click handler sets ViewState via public Property)
Constructor
OnInit
LoadViewState
CreateChildControls
OnLoad
PostBack click handling
ConnectionConsumer method is called if web part is connectable (sets the connection providers interface in the webpart)
OnPreRender (if your web part is connectable you would typically call the connection provider here to retrieve data)
SaveViewState
Render
RenderChildren
RenderContents