Developing Custom Web Parts
This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
All custom Web Parts for the 2007 Microsoft Office system are derived from the Microsoft ASP.NET 2.0 WebPart base class. Microsoft Office Project Server 2007 Web Parts are built on the Windows SharePoint Services 3.0WebPart base class, which is in turn built on the ASP.NET 2.0 Web Part infrastructure.
The base class provides basic properties that are common to all Web Parts, such as Title, Description, and so forth. You can add custom properties to your derived class and, at run time, the two sets of properties are presented and run as a single set of properties.
ASP.NET and SharePoint Web Parts
ASP.NET Web Parts have description file names that use the .webpart extension. In general, you should design new Web Parts that inherit from the ASP.NET 2.0 WebPart class. ASP.NET Web Parts provide the greatest flexibility and compatibility with Web sites that are not tightly coupled with Windows SharePoint Services.
SharePoint Web Parts have description file names that use the .dwp extension. Windows SharePoint Services 3.0 Web Parts provide backward compatibility with Windows SharePoint Services 2.0. SharePoint Web Parts include additional functionality but can be used only in a SharePoint Web site. Following is a list of the added features of SharePoint Web Parts.
Cross-page connections in SharePoint sites
Connections between Web Parts that are outside of a Web Part zone
Client-side connections using the Web Part Page Services Component
Web Part data caching
Asynchronous processing using Web Part work items
You can create ASP.NET Web Parts that log on to Project Server, use the Project Server Interface (PSI), and work in a Web site that is not part of the Windows SharePoint Services farm where Project Server is located. You can also add ASP.NET Web Parts to SharePoint sites, for example to Project Web Access.
If the custom Web Part is designed to work within the same server farm as Project Server, you can use a SharePoint Web Part. The sample in Walkthrough: Creating a Custom Project Server Web Part uses a SharePoint Web Part.
For more information about developing and connecting Web Parts, importing an ASP.NET Web Part to a Windows SharePoint Services site, and the SharePoint Web Part object model (such as SPSite.GetWorkItems), see the Windows SharePoint Services 3.0 SDK. The Windows SharePoint Services Developer Center (http://msdn.microsoft.com/sharepoint/) has links to the Windows SharePoint Services 3.0 SDK, downloads, and other developer resources.
Note |
---|
The Web Parts in the Microsoft.Office.Project.Server.PWA.dll assembly are not documented or supported for third-party development. While it is possible to derive other Web Parts from base classes such as Microsoft.Office.Project.Server.PWA.WebParts.PWAPart, we do not recommend or support that. It is not possible to derive other Web Parts from the sealed Project Web Access Web Parts such as TaskPart. |
See Also
Tasks
Walkthrough: Creating a Custom Project Server Web Part
Other Resources
Introducing the ASP.NET 2.0 Web Parts Framework