|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer|
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.
Windows SharePoint Services 2.0 introduced sinking events that were triggered from within a Windows SharePoint Services 2.0 document library by attaching a Microsoft .NET assembly to the document library. The event sinking was limited, however, to the document library or form library, and events were triggered only after the actual action occurred within the library. Windows SharePoint Services 3.0 goes a step further and introduces a new and extensive set of events that you can use, not only within libraries but also now within lists, sites, and user operations.
Events in Windows SharePoint Services 3.0 now support the following capabilities:
You can use pre-synchronous and post-asynchronous modes to handle events.
You can register events at the file, list, and Web site levels.
You can register multiple events per item.
You can cancel pre-synchronous events and display custom error messages.
You can register item events on generic lists, as well as on document libraries.
You can declaratively register events per list type or content type.
In addition to trapping standard list item events (for example, ItemAdding, ItemDeleting, or ItemUpdating), you can trap schema events (such as adding, removing, or updating columns), as well as Web site and site collection deletion.
The following topics explore how to set up event handlers in the context of Windows SharePoint Services 3.0: