Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

SPItemEventReceiver.ItemAttachmentDeleting Method

Handles the synchronous event that occurs before an attachment is removed from an item.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
Public Overridable Sub ItemAttachmentDeleting ( _
	properties As SPItemEventProperties _
Dim instance As SPItemEventReceiver
Dim properties As SPItemEventProperties



Type: Microsoft.SharePoint.SPItemEventProperties
The properties of the event handler.

properties is null .

This event occurs when an attachment is being removed from a list item, but no other updates occur. This event occurs after the ItemUpdating(SPItemEventProperties) event if other changes are made to the item.

This event does not occur if the item itself is removed.

Caution noteCaution

When trying to remove an attachment from an item, do not use the property setting Status=CancelNoError to cancel this event, since doing so redirects the user to the "Exception from HRESULT" error page.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft. All rights reserved.