SharePoint Pals
 | Sign In
How to create a custom list level event receiver in SharePoint 2013 and SharePoint 2010
by Gopal Muthukrishnan 20 Apr 2013
SharePoint Developer, SharePoint Frontier
Today  :   16     Total  :    42911

This article provides a detailed steps for creating a list event receiver in SharePoint. Although the steps explained are related to SharePoint 2010, its same for SharePoint 2013 too.

Follow the below steps to create an event receiver for a SharePoint List.

Step 1:

Open visual studio 2010 and create empty SharePoint project.

Step 2:

Enter the SharePoint URL in SharePoint customization wizard, Choose Deploy as a sandboxed solution and click Finish.


Step 3:

Right click the project and select Add new Item and select create event receiver and click ok. This would open up Event Receiver Settings Wizard

Step 4:

In the event receiver settings dialog select the “List Item Events” as a type of event receiver and “custom List” in the item source drop down. Select “An Item was Added” from Handle the following event and click finish.


Step 5:

In the event receiver class of list , add the below mentioned code. This is just a simple example to change the title to current date.

public override void ItemAdded(SPItemEventProperties properties)
SPListItem _currentItem = properties.ListItem;
_currentItem["Title"] = DateTime.Now.ToString();

Step 6:

Now build and deploy the project to the SharePoint

Step 7:

In SharePoint Site click Site Actions => Site Settings => Galleries =>Solution and verify that your solution is now deployed to the site.



Step 8:

Create  a new Custom List “Test Event Receiver” and Add a new item to test the project and click Add.


Step 9:

Create new item and enter “Test Item” in the Title text box


Step 10:

Once you add the item and refresh the custom list page , you can see the results as date and time as we have updated the data in event receiver.


blog comments powered by Disqus

SharePoint Pals

SharePoint Pals, a community portal for SharePoint developers, Administrators and End Users. Let's join hands and share the point together.
Read this on mobile


Angular Js Training In Chennai
Advanced Angular Js training with real world developer scenarios
Angular Js, Web Api and Ionic for .Net Developers
All in one client side application development for .Net developers
Angular Js For SharePoint Developers
Get ready for the future. Its no more just C#

Get Connected

SharePoint Resources

SharePoint 2013 and 2010 Web Parts
Free Web Parts with Source Code for SharePoint Community

SharePoint 2013 Books and Tutorials
Collection of free SharePoint 2013 books and tutorials (eBooks, pdfs)

Supported By

Contribute your article and be eligible for a one month Free Subscription for Plural Sight. The Author of the most popular New Article (published in the previous month) will be awarded with a Free One month Plural Sight Subscription. Article can be sent to in a word document.

Related Resources

Recent Tweets

Twitter October 23, 22:21
How to Add/Remove User Custom Actions (in Site Actions Menu) Programmatically using CSOM PNP in SharePoint -

Twitter October 21, 21:34
How to Add a JS Link Reference to the Display Form or Any other ASPX Programmatically using CSOM PNP in SharePoint -

Twitter October 20, 13:01
How to Add a JS Link Reference to the NewForm and EditForm Programmatically using CSOM PNP in SharePoint Office 365-

Twitter October 12, 12:15
How to Deploy Provider Hosted Apps (Add-Ins) by App Stapling in SharePoint Office 365 -

Twitter October 11, 13:39
How to Deploy Provider HostedApp programmatically using CSOM in SharePoint Office 365 Activating Developer Feature -

Follow us @SharePointPals
Note: For Customization and Configuration, CheckOutRecent Tweets Documentation