SharePoint Event Receiver

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.