The SDK has some good detail.  Basically it depends if you have upgraded from 
SharePoint 2003 or if you need specific features that are only SharePoint 
related. As it derives from the ASP.NET Control anyway, usually the ASP.NET 
class is all you need.

Here is the relevant info from the SDK:

Beginning with Windows SharePoint Services 3.0, the SharePoint Web Part 
infrastructure is designed and built to lie on top of the Microsoft ASP.NET Web 
Part infrastructure. Web Parts that inherit from 
System.Web.UI.WebControls.WebParts.WebPart are fully supported in Windows 
SharePoint Services (with the exception of user controls as generic Web Parts), 
and can be used not only in ASP.NET applications but also in Windows SharePoint 
Services applications, whether Windows SharePoint Services is involved or not. 
The Windows SharePoint ServicesWebPart class is part of an infrastructure that 
was designed specifically for SharePoint sites, and Web Parts that inherit from 
this class can be used only in SharePoint sites.

When creating new Web Parts, you have the option of creating Web Parts that 
inherit from System.Web.UI.WebControls.WebParts.WebPart (recommended) or 
Microsoft.SharePoint.WebPartPages.WebPart. The Windows SharePoint 
ServicesWebPart class exists primarily for the purpose of backward 
compatibility (Web Parts written for Windows SharePoint Services 2.0 continue 
to work in Windows SharePoint Services 3.0 without modification), and to 
provide a small set of features that are not available in the 
System.Web.UI.WebControls.WebParts.WebPart class.

The set of features provided exclusively by 
Microsoft.SharePoint.WebPartPages.WebPart is as follows:

*         Cross page connections

*         Connections between Web Parts that are outside of a zone

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

*         Data caching infrastructure, including the ability to cache to the 
database


Regards,

Paul Turner
MCT, MCPD: Enterprise, MCSD, MCDBA, MCTS, MSF, Microsoft vTSP
Consultant

M: 0412 748 168
A: 66 Henley Beach Road, Mile End SA 5031
E: paul.tur...@dws.com.au<mailto:paul.tur...@dws.com.au>  W: 
www.dws.com.au<http://www.dws.com.au/>

This email and any files transmitted with it are confidential and are only for 
the use of the person to whom they are addressed. If you are not the intended 
recipient you have received this email in error and are requested to delete it 
immediately. Any opinion expressed in this e-mail may not necessarily be that 
of DWS Pty Ltd.
Please consider the environment before printing this email.

From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of 
Ajay
Sent: Monday, 21 June 2010 11:46 AM
To: ozMOSS
Subject: Re: SharePoint web parts

Cheers,
yep.. asp.net<http://asp.net> based webpart looks the way to go.


On Mon, Jun 21, 2010 at 11:25 AM, Joseph Clark 
<jcl...@atlassian.com<mailto:jcl...@atlassian.com>> wrote:
Hi Ajay,

The literature I have read suggests that you should use the vanilla 
ASP.NET<http://ASP.NET> base web part, unless you have a specific need for the 
additional functionality exposed by the SharePoint base web part.  They are 
basically the same, except that the SP WebPart exposes a couple of extra 
convenience functions for SharePoint that are difficult to do otherwise (for 
example, serializing web part properties directly to the Content DB).

Unfortunately the book didn't go in to any additional detail about why this was 
the preferred approach.  I suspect that, as the ASP.NET<http://ASP.NET> base 
web part is the newer of the two, that the SharePoint base web part may 
eventually be folded in to it.

Hope this helps,
Joe.



On Sat, Jun 19, 2010 at 3:50 PM, Ajay 
<akhanna...@gmail.com<mailto:akhanna...@gmail.com>> wrote:
I have to create a SP 2010 web part with a custom toolpart.

Which one should I use --> asp.net<http://asp.net> webparts class or 
Sharepoint.webcontrols.webpart.

Since both are inside the project template created by VS.





_______________________________________________
ozmoss mailing list
ozmoss@ozmoss.com<mailto:ozmoss@ozmoss.com>
http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss


_______________________________________________
ozmoss mailing list
ozmoss@ozmoss.com<mailto:ozmoss@ozmoss.com>
http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss

_______________________________________________
ozmoss mailing list
ozmoss@ozmoss.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss

Reply via email to