Logo 
Search:

Sharepoint FAQ

Submit Interview FAQ
Home » Interview FAQ » SharepointRSS Feeds

What are the two base classes a WebPart you are going to use within Sharepoint 2007 can inherit

  Shared By: Tarang Nayak    Date: Mar 12    Category: Sharepoint    Views: 657

Answer:

What are the two base classes a WebPart you are going to use within Sharepoint 2007 can inherit from?

There are two base classes that a WebPart which is going to be consumed by Sharepoint can inherit from, either the Sharepoint WebPart Base class or the ASP.NET 2.0 WebPart base class. When inheriting from the Sharepoint WebPart Base class your derived WebPart class will inherit from Microsoft.Sharepoint.WebPartPages.WebPart. When inheriting from the ASP.NET 2.0 WebPart base class your derived WebPart class will inherit from System.Web.UI.WebControls.WebParts.WebPart. It is considered good practice to use the ASP.NET WebPart base class since the old base class is meant for backwards compatibility with previous version of Sharepoint, however there are four exception when it is better to leverage functionality from the Sharepoint WebPart base class:

Cross page connections

Connections between Web Parts that are outside of a Web Part zone

Client-side connections (Web Part Page Services Component)
Data caching infrastructure

Share: 
 


Related Topics:

Your Comment
  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].


Tagged: