4.5. Web Parts

A Web Part is a user interface component similar to the familiar controls we see on ordinary web pages, such as text boxes and buttons. However, in addition to providing "canned" UI functionality, Web Parts can also participate in SharePoint's personalization infrastructure. That is, individual users can add, remove, and configure their own custom view of a SharePoint site by manipulating the Web Parts available to them. Users, of course, have this privilege only if the SharePoint administrator grants it to them. Also, while web controls typically provide simple UI functionality such as text boxes, Web Parts are often complex UI elements that can connect to back-end data providers or business processes.

In WSS 3.0 the Web Part infrastructure is built entirely on top of the ASP.NET 2.0 Web Part classes. This means that with very little additional training, an ASP.NET developer can build Web Parts that will also run in the SharePoint environment. Web Parts can be used to perform a myriad of tasks. They can connect to a SQL Server database, connect to an Active Directory, or access SQL Server Reporting Services among other things. Almost anything you can do with custom code, you can do within a Web Part. Web Part development is relatively easy and is a powerful way to extend SharePoint and ASP.NET sites.

The following nonexhaustive list borrowed from the SDK, demonstrates some of the ways in which you can use custom Web Parts:

  • Creating custom properties, you can display ...

Get Professional SharePoint® 2007 Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.