tags:

views:

854

answers:

2

What are the steps required in attaching an event receiver to a custom list in sharepoint?

+1  A: 

This can be done in at least two different ways:

  1. Create a feature that upon feature activation you have the proper code to attach to a specific list (use this URL for some help)
  2. Or you could have a console application that will have code to attach to a specific list (again using the same code as in the URL mentioned above)

For further help go here.

hobbyman
+2  A: 

There are several ways to attach EventReceivers to lists, ContentTypes or sites. Take a look at Brian Wilson's blog post about this topic and describes several ways to do this.

He also developed a SharePoint Feature which deploys a configuration page where you can attach and delete EventReceivers over an UI.

Flo