SPItemEventReceiver.ItemAttachmentAdded Method

Handles the asynchronous event that occurs after an attachment is added to an item.

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

Syntax

'Declaration
Public Overridable Sub ItemAttachmentAdded ( _
    properties As SPItemEventProperties _
)
'Usage
Dim instance As SPItemEventReceiver
Dim properties As SPItemEventProperties

instance.ItemAttachmentAdded(properties)
public virtual void ItemAttachmentAdded(
    SPItemEventProperties properties
)

Parameters

Exceptions

Exception Condition
ArgumentNullException

properties is null .

Remarks

This event occurs when an attachment is added to a list item, but no other updates occur. The event occurs after the ItemUpdated event if other changes are made to the item.

Before and After properties are guaranteed for postback events on documents, but Before properties are not available for postback events on list items.

See Also

Reference

SPItemEventReceiver Class

SPItemEventReceiver Members

Microsoft.SharePoint Namespace