With SharePoint 2010, “after” events or those ending with -ed such as ItemAdded, ItemDeleted, are exlusively asynchronous events. Most of the time, these would be fine and in case we needed the event to be synchoronous, then we use the -ing events such as ItemAdding or ItemDeleting. But what if we want to do some cleanup after the event has been completed? A scenario that came up to my mind is if we want to redirect the user to another page after a new item has been added or deleted to a list.
Post Synchronous events are now supported with the addition of the “Synchronization” property in the SPEventReceiverDefinition class.
SPEventReceiverDefinition myReceiver = eventReceivers.Add();
myReceiver.Synchronization = SPEventReceiverSynchronization.Sychronous;
Popularity: 11%