What is Event Receivers ?

Event receivers is will fire before action take place and after action take place.

Types of Event Receiver

There are two types of Event Receiver in SharePoint,

  1. Synchronous Event Receiver
  2. Asynchronous Event Receiver

Synchronous Event Receiver ( Before Event Receiver )

Synchronous will fire before action take place which means the data before commit inside database .

Ex:- adding,updating,deleting

Asynchronous Event Receiver( After Event Receiver )

Asynchronous will fire after action take place which means the data after commit inside database .

Ex:- added,updated,deleted

Class of SharePoint Event Receiver

  • Base class: Microsoft.SharePoint.SPEventReceiverBase.
  • Base class for List Item: Microsoft.SharePoint.SPItemEventReceiver
  • Base class for Email: Microsoft.SharePoint.SPEmailEventReceiver

Event Receiver Base Classes

  • SPItemEventReceiver
  • SPListEventReceiver
  • SPEmailEventReceiver
  • SPWebEventReceiver
  • SPWorkflowEventReceiver

Leave a Reply

Your email address will not be published. Required fields are marked *