Tuesday, September 27, 2011

Adding list event receivers programatically

Recently, I was in a situation where event receivers needs to be attached to a SPList. Here is how it can be added dynamically using the api.



Like the above code, we can add the event receivers for any list event.

I have not tried the same for any other event receivers, but I am guessing it should be working the same way.

Thanks
Senthil S

No comments:

Post a Comment