Home > DeveloperSection > Interviews > What are the differences between the two base classes and what are the inherit benefits of using one over another?

Posted on    November-15-2011 3:12 AM

 SharePoint SharePoint 
 1 Answer(s)
  1956  View(s)
Rate this:

Awadhendra Tiwari

Total Post:510

Posted on    November-15-2011 1:00 AM

The difference is the Microsoft.SharePoint.WebPartPages.WebPart base class is meant for backward compatibility with previous versions of SharePoint. The benefit of using the SharePoint WebPart base class is it supported:

1)  Cross page connections Connections between Web Parts that are outside of a Web Part zone

2)  Client-side connections (Web Part Page Services Component)

3)  Data caching infrastructure

ASP.NET 2.0 Web Parts are generally considered better to use because SharePoint is built upon the ASP.NET 2.0 web architecture. Inheriting from the ASP.NET 2.0 base class offers you features that inherit to ASP.NET 2.0, such as embedding resources as opposed to use ClassResources for deployment of said types.

Don't want to miss updates? Please click the below button!

Follow MindStick