Powered By Blogger

Wednesday, 23 November 2011

Creating Event Receiver in Sharepoint 2010

In this blog I am going to demonstrate how to create a simple Item added event receiver for a custom list in SharePoint 2010

1.Start Visual Studio 2010. and create a new Project.
2. In project types select Event Receiver and give it a name (Select .net framework 3.5).
3.Next, In the SharePoint Customization Wizard, choose Deploy as a sandboxed solution and specify the site url
4. Next, in 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”then click next.
5.Click Finish.
6. Next, In order to Change the Title of an item to the current Data and Time when it is added to a custom list.

 7.Write below code.Press F5 it will start to deploy.
Then check whether it gets activated in Site Actions>site settings>gallery>solutions>Your Project name



  

 8.Create a custom List in that custom List add a new item and refresh the page and view Code works.


No comments:

Post a Comment