Compartilhar via


SPSite.EventReceivers Property

Provides event receivers for events that occur at the scope of the site collection.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
Public ReadOnly Property EventReceivers As SPEventReceiverDefinitionCollection
    Get
'Usage
Dim instance As SPSite
Dim value As SPEventReceiverDefinitionCollection

value = instance.EventReceivers
public SPEventReceiverDefinitionCollection EventReceivers { get; }

Property Value

Type: Microsoft.SharePoint.SPEventReceiverDefinitionCollection
Returns SPEventReceiverDefinitionCollection.

Remarks

Items that are associated with a site collection for which you have registered this event receiver – for example, any lists that exist on the site – will have these site-level events bound to them.

See Also

Reference

SPSite Class

SPSite Members

Microsoft.SharePoint Namespace