Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
In Hour 8, “Understanding Client Object Model in SharePoint 2010,” you learned how SharePoint enables you to hook the events in the life cycle of a SharePoint site collection and a SharePoint site through various event receivers provided by SharePoint. This section looks at the event receivers for a list and for list items. The event receivers for a list and list items can be categorized in two ways. One is the event receivers that get called when an event is happening and before it is completed. For example, the FieldAdding event is called before a new field is added to the list, and the ItemAdding event gets called before a new list item is created. Similarly some event receivers get called after the event has happened. For example, the FieldAdded event receiver gets called after a new field has been added to the list, and the ItemAdded event receiver gets called after a new list item has been created. You will find that the name of Before events end with “ing” and the name of the After events end with “ed.”