Sharepoint - Get list of event receivers registered for a list created from a list definition

Finally traked it down.

The event receiver was listed under SPSite.EventReceivers.

As per msdn, the event receiver will be registered as per the scope specified (seems to default to feature scope). As my feature (which contained list template and event receiver) was deployed using scope=site, the event is listed under spsite.eventreceivers (registered event receiver to all lists of the specified list template type in the site collection).

Scoping the feature to web registered the receiver to all list of the particular web. SPList.EventReceivers had the specified event receiver name this time. Using ListUrl attribute instead of ListTemplateId registered the event receiver to a particular list instance.

Can someone add more information.

See Receiver element Schema

Tags: