Karine Bosch’s Blog

On SharePoint

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.

 

October 12, 2011 - Posted by | SharePoint 2007, SharePoint 2010

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: