In this post, we will discuss various SharePoint event model in SharePoint server 2010.
SharePoint 2016 Tutorial Contents
Following the List of SharePoint Event Model:
- Before and After Events
- Event Hosts
- Event Receivers and Handling Events
- Binding Event Handlers
Before and After Events
These events fire before an action occur and before SharePoint has written any data to the content database. For this reason, Before events are always synchronous.
You can identify Before events because their member names end with the “-ing” suffix – for example, ItemAdding, ListAdding.
After events, on the other hand, trigger event handlers that execute after user actions are committed to the content database and they invoke code that runs after the content database has been modified. This provides an opportunity to develop code that executes logic that occurs after a user has completed a specific action.
Because After events execute in a different process from the triggering action, they can execute either synchronously or asynchronously. You can identify After events because their member names end with the “-ed” suffix – for example, ItemDeleted, WebProvisioned.
Event hosts are objects, such as site collections, Webs, lists and list items, that expect to receive events – or, in other words, objects whose event receivers “listen” for SharePoint Foundation events. These SharePoint Foundation 2010 event host object types include instances of common objects such as SPSite, SPWeb, SPList, and SPContentType.
Each of the event host types has specific event receiver base types from which you can inherit, to create an event receiver collection.
Event Receivers and Handling Events
SharePoint Foundation event handlers are a compiled module of custom managed code whose invocation is triggered by a specified event that you have specified. Event handler code is compiled into a .dll file and deployed to the GAC.
Binding Event Handlers
After your event handler code is compiled and deployed to the GAC, you need to bind it to a receiver object. Also known by the term “register,” binding is the process by which event handler code is associated with an object type.
Following Event types:
– Site Events
– Web Events
– List Events
– List Field Events
– Item Events
You may like following SharePoint event receivers tutorials:
- Event Receivers in SharePoint 2010
- BeforeProperties and AfterProperties in Event Receiver in SharePoint 2013
- Create an event handler to prevent items from deleting an item from SharePoint list using Visual Studio 2010
- Attach event receiver to list in SharePoint 2010
- Difference between workflows and event receivers in SharePoint 2013
- Remote Event Receivers in SharePoint online + Develop in Provider hosted Add-in using Visual Studio 2015 and Deploy to Microsoft Azure
Hope this SharePoint 2010 tutorial gives an idea on List of SharePoint Event Model in SharePoint Server 2010.
You May Also like the Following SharePoint Tutorials: