Share via


SPWebEventReceiver.SiteDeleting Method

Occurs when a site collection is being deleted.

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

Syntax

'Declaration
Public Overridable Sub SiteDeleting ( _
    properties As SPWebEventProperties _
)
'Usage
Dim instance As SPWebEventReceiver
Dim properties As SPWebEventProperties

instance.SiteDeleting(properties)
public virtual void SiteDeleting(
    SPWebEventProperties properties
)

Parameters

Exceptions

Exception Condition
ArgumentNullException

properties is null .

Remarks

You should not use the property setting Status=CancelNoError to cancel an event, since doing so redirects the user to the noninformative "Delete Web" page.

See Also

Reference

SPWebEventReceiver Class

SPWebEventReceiver Members

Microsoft.SharePoint Namespace