SPEventReceiverDefinition.HostType Property

Gets or sets the type of object that is hosting the event.

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

Syntax

'Declaration
Public Property HostType As SPEventHostType
    Get
    Set
'Usage
Dim instance As SPEventReceiverDefinition
Dim value As SPEventHostType

value = instance.HostType

instance.HostType = value
public SPEventHostType HostType { get; set; }

Property Value

Type: Microsoft.SharePoint.SPEventHostType
An SPEventHostType value specifying the type of object.

Remarks

Users perform actions such as delete, update, check in, or convert on Microsoft SharePoint Foundation objects. When a SharePoint Foundation object has some action performed on it by the user, the object generates an event. The event that specified that an action occurred must be received by an event host specified by the site. Content types, features, lists and list items, sites, webs, and workflows are all types of event hosts.

See Also

Reference

SPEventReceiverDefinition Class

SPEventReceiverDefinition Members

Microsoft.SharePoint Namespace

Other Resources

Event Host Type

Event Receiver Type