Showing posts with label Super Class for WebPart. Show all posts
Showing posts with label Super Class for WebPart. Show all posts

Tuesday 13 March 2012

Base class used while creating a webpart

There are two base classes which are going to be consumed by sharepoint can inherit from, either the sharepoint base class or ASP.NET2.0 Webpart base class.When inheriting from sharepoint base class your derived webpart will inherit from Microsoft.Sharepoint.WebPartPages.WebPart base class. When ingeriting from ASP.Net 2.0 webpart base class, your derived webpart will use System.Web.UI.WebControls.WebParts.WebPart . It is preferable to use ASP.NET base class as old base class is meant of backward compatibility  with previous version of sharepoint.However there are four exception when it is better to leaverage functionality from sharepoint webpart base class.
These are the scenarios:

  1. Cross Page connection.
  2. Connection between webpart that are outside webpart zone.
  3. Client side conection.
  4. data-cachieng infrastructure
for any further detail,you can post your query.

Pages

Followers