Adding an Event Receiver to a Content Type using the Visual Studio 2010 tools for SharePoint 2010
One of my blog readers commented that she tried to add an event receiver to a content type, based on the explanation in one of my older walkthroughs, but wasn’t able to deploy successfully. These walkthroughs are written for SharePoint 2007. If you want to develop for SharePoint 2010 using the Visual Studio 2010 tools, it is a completely different story.
I though, this is an easy one, but as I started to rebuild my sample for SharePoint 2010, I came to the conclusion that Visual Studio 2010 offers you the possibility to add event receivers to different types of list instances and to sites, but not to content types. Some bloggers propose to add the content type to the list instance and then test upon the ContentType field value, but that’s not the way to go in my opinion. I wrote a small walkthrough on how to develop an event receiver for a content type.
No comments yet.