Поделиться через


Event Fundamentals

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.

In This Section

The following topics explore how to set up event handlers in the context of Windows SharePoint Services 3.0:

What's New with Event Handlers

Creating a Basic Event Handler

Registering an Event Handler

Registering Event Handlers as Content Types

Event Troubleshooting

Walkthrough: Handling Document Library Events

See Also

Concepts

Working with List Objects and Collections

Getting Started with Programmatically Customizing a SharePoint Web Site in Visual Studio

Security Validation and Making Posts to Update Data

Elevation of Privilege