What are WebParts and in what ways does it vary in SharePoint environment?

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

It helps to build reusable components which can be customized and personalized according to business user. We can either make our own webpart or we can reuse the existing one's from SharePoint itself.

Following WebParts are available with WSS:-

Data View Web Part: - Displays data with rich design support through Microsoft SharePoint Designer.

List View Web Part: - Helps us to display list content for any list in the SharePoint site.

Image Web Part: - Helps us to display image files.

Content Editor Web Part: - Use this to display static HTML content using a WYSIWYG editor or to link to a text file.

Members Web Part: - Helps us to display members of the site.

Page Viewer Web Part: -   Displays web page in an Iframe.

WebPart is nothing but a simple class which inherits from System.Web.UI.WebControls.WebParts. In other words you can say WebPart is kind of a WebControl which can be deployed in a WebPartZoneControl.


WebPart manager control is like controller which maintains instances of Webpart. It adds WebParts to the WebPartZone when the ASP.NET pages get initialized.


Now let’s try to how ‘WebParts’ work in SharePoint environment. ‘WebPartManager’ uses the ‘SPWebPartManager’. ‘WebPartZone’ interacts with the ‘WebPartManager’ who in-turn stores a serialized instance of the ‘WebPart’ in the content database.  In other words code is stored in content database for customization.


The big difference is that the ‘WebPart’ code is stored in content database. So some of the differences as compared to normal ASP.NET is that, the code is deployed in content database and is parsed using ‘Safe Mode Parser’.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response