There are two classes that we can use for custom web part development, Microsoft.SharePoint.WebPartPages.WebPart and Microsoft.SharePoint.WebPartPages.WebPart. So when do we use these?

Microsoft.SharePoint.WebPartPages.WebPart derives from the ASP.NET WebPart class and includes multiple compatibility layers to simplify code migration. This means we should use Microsoft.SharePoint.WebPartPages.WebPart when we are migrating existing code from WSS 2.0. When we are developing new webparts you should use System.Web.UI.WebControls.WebParts.WebPart.


There are two classes that we can use for custom web part development, Microsoft.SharePoint.WebPartPages.WebPart and Microsoft.SharePoint.WebPartPages.WebPart. So when do we use these?

Microsoft.SharePoint.WebPartPages.WebPart derives from the ASP.NET WebPart class and includes multiple compatibility layers to simplify code migration. This means we should use Microsoft.SharePoint.WebPartPages.WebPart when we are migrating existing code from WSS 2.0. When we are developing new webparts you should use System.Web.UI.WebControls.WebParts.WebPart.

Advertisements