SharePoint Event ReceiversIntroduction
The SharePoint event receiver, which allows programmers to register their own code with event receivers. The method of registration is executed when the event occurs. This section explains SharePoint list registration events with sharepoint2013 as an example.
Implementation Method
1. Create a new event trigger.
Right-click the project------Select New-----Select Event Receiver
2. Select Event Receiver
The user can choose which type of event receiver, which is the event source, and which events are handled. Handles those events and is triggered for handling those events. Here the Select List Event event source is the picture library, and the processing event for the item has been added.
3. Register your own code of execution.
The Name property of the item you just added is modified here.
<span style= "FONT-SIZE:18PX;" >///<summary>/// added item. </summary> publicoverridevoid ItemAdded (spitemeventproperties properties) { SPListItem item = Properties. ListItem; Item. Name = "Event received successfully"; Item. Update (); } </span>
4. Add the event receiver to the feature form,
5, after deployment, under the current site activation function can be
Summary
SharePoint provides events that make it easy for programmers to customize. With this simple example, we can learn more about the properties of each node that need to be understood by clicking Create event receiver.
SharePoint Event Receiver