EventReceiver Element (DeploymentManifest)
Applies to: SharePoint Foundation 2010
Represents a SharePoint event receiver object instance (SPEventReceiverDefinition). Depending on the event receiver collection specified, the event receiver can listen for events on SPFile, SPList, SPListItem, or SPWeb objects.
DECLARATION
<xs:element name="EventReceiver"
type="SPEventReceiverDefinition"
minOccurs="0" maxOccurs="unbounded"
/>
USAGE
<EventReceivers>
<EventReceiver
Id="Guid"
Name="xs:string"
WebId="Guid"
HostId="Guid"
HostType="SPEventHostType"
Type="SPEventReceiverType"
SequenceNumber="xs:int"
Assembly="xs:string"
Class="xs:string"
Data="xs:string"
Filter="xs:string"
Credential="xs:int"
ItemId="xs:int"
/>
</EventReceivers>
Type
Attributes
Attribute |
Type |
Description |
---|---|---|
ID |
Required. Unique identifier of the event receiver definition. |
|
Name |
xs:string |
Required. Name of the event receiver. |
WebId |
Required. Unique identifier of the site in which the event receiver is registered. |
|
HostId |
Required. Unique identifier of the object that is hosting the event. |
|
HostType |
Required. Type of object that is hosting the event. The host type must be an enumeration value defined in the SPEventHostTypesimple type. |
|
Type |
Required. Type of event for the event receiver. The event receiver type must be an enumeration value defined in the SPEventReceiverType simple type. |
|
SequenceNumber |
xs:int |
Required. Integer representing the relative order in a sequence of events. |
Assembly |
xs:string |
Required. Strong name representing the assembly that is the event receiver. |
Class |
xs:string |
Required. The class that is the event receiver. |
Data |
xs:string |
Optional. Data that is associated with the event receiver. |
Filter |
xs:string |
Optional. |
Credential |
xs:int |
Optional. |
ItemId |
xs:int |
Optional. |
Child Elements
None |