Sharepoint spitemeventreceiver itemupdating
This provides an opportunity for an event receiver to perform tasks before data is committed to a database.A good example of the use of Before events is performing data validation, because Before events fire prior to commitment of data.You can also use Before (or synchronous) events to cancel user actions—for example, if data validation fails.Event receiver code that is triggered by a Before event executes in the same thread as the code that is executing the user action that triggered it.From the list table, you can see if we hook into the Item Updating event, we can compare the current item’s value (properties. It used to be a standard practice to use redirect in event receivers in Share Point 2010 and Share Point 2007.
You can identify Before events because their member names end with the "-ing" suffix—After events trigger event receivers that execute after user actions are committed to the content database; they invoke code that runs after the content database has been modified.
Once VS finishes processing, you will have a solution structure similar to the below image.
For documents, Before and After properties are guaranteed for post events, such as Item Updating and Item Updated, but Before properties are not available for post events on list items.
Later in this article, we discuss event binding and the different methods with which you can bind events.
Looked at another way, Before events are raised when an action occurs before Share Point writes to the content database.
Share Point 2013 has some changes in this functionality.