Visit our SharePoint Forum

SharePoint developer? Submit Yourself as Freelancer

Sunday, April 27, 2008

About Event Receivers and Event Handlers

Tere are two types of Events

Synchronous and Asynchronous Events.

* Synchronous events can trap an item, document library or site before it is deleted,added or updated.
eg, ItemAdding, ItemUpdating,ItemDeleting etc.
* Asynchronous events can trap an item, document library or site when it is added,deleted or updated.
eg, ItemAdded, ItemUpdated,ItemDeleted etc.


We create Event Recivers to handle these events. An event receiver basically, is a piece of managed code that is launched in response to an event that takes place within SharePoint.

SharePoint Object Model exposes several event classes inherited from Microsoft.SharePoint assembly. There are three main event classes:

SPItemEventReceiver
SPListEventReceiver
SPWebEventReceiver


Each class includes both synchronous and asynchronous methods to work with Item, List or Web Level.

Some of the Good Examples are on :
http://www.codeproject.com/KB/sharepoint/ExtendingSPS.aspx
http://msdn2.microsoft.com/en-us/library/ms453149.aspx

0 comments:

SharePoint Programming