Web Part life cycle in SharePoint 2010
Check out Best Alternative to InfoPath -> Try Now
This SharePoint 2010 tutorial I will explain the web part life cycle in SharePoint 2010 or web part page life cycle in SharePoint 2010/2013. Learn about the web part life cycle SharePoint 2010.
Web parts are a very important element in SharePoint and As a SharePoint developer, we should know about web part life cycle events. Here we will discuss the web part life cycle in SharePoint.
Web part life cycle SharePoint 2010
Like the Asp.Net lifecycle, there is also a Web Part life cycle in SharePoint 2010. So it is better to understand the web part life cycle of SharePoint.
Below is the web part life cycle SharePoint 2010/2013:
This method handles the initialization of the control.
This event handles the Load event. This is also used for initializing the control but is not intended for loading data or other processing functionality.
This is the most popular event in the web part life cycle. This creates any child controls. So if you are adding any control to display then you have to write in this method.
This method ensures that CreateChildControls has executed. EnsureChildControls method must be called to prevent null reference exceptions.
View state of the web part saved.
This method handles or initiates tasks such as data loading that must complete before the control can render.
The page fires the PreRenderComplete event after all controls have completed their OnPreRender methods.
This method is used to render everything.
Renders the contents of the control only, inside of the outer tags and style properties.
Performs the final cleanup.
You may also like following SharePoint 2010 tutorials:
- SharePoint 2010 Tutorial
- How to use WebProvisioned event in SharePoint 2010?
- Download Microsoft SharePoint Server 2010
- SharePoint 2010 hardware and software requirements
- How to create flyout menu in SharePoint 2010
- Working with SharePoint Calendar in SharePoint 2016/2013/Online
- SharePoint Left Navigation or Quick Launch Navigation Menu Customization in SharePoint Online/2016/2013
I hope this SharePoint tutorial explains web part life cycle in SharePoint 2010 or web part page life cycle in SharePoint 2010/2013
Download SharePoint Online Tutorial PDF FREE!
Get update on Webinars, video tutorials, training courses etc.