Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Asynchronous After event that occurs after an existing Web site is completely deleted.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
'Declaration
Public Overridable Sub WebDeleted ( _
properties As SPWebEventProperties _
)
'Usage
Dim instance As SPWebEventReceiver
Dim properties As SPWebEventProperties
instance.WebDeleted(properties)
public virtual void WebDeleted(
SPWebEventProperties properties
)
properties
Type: Microsoft.SharePoint.SPWebEventPropertiesAn SPWebEventProperties object that represents properties of the event handler.
Exception | Condition |
---|---|
ArgumentNullException | properties is null . |
Web site deletion events occur in the following cases:
The Web site is deleted through the user interface.
The folder that contains a Web site is deleted in an application that is compatible with Microsoft SharePoint Foundation (such as SharePoint Designer) through remote procedure call protocol (RPC).
The folder that contains a Web site is deleted through Distributed Authoring and Versioning (DAV).
Web site deletion events occur only for the first Web site in a chain of sites. For example, if a Web site at http://TopSite/Site, which has the subwebs http://TopSite/Site/Subsite1 and http://TopSite/Site/Subsite2, is deleted in , only one deletion event occurs, namely, for the http://TopSite/Site root Web site.
Warning
If you attempt to access the deleted Web in your event receiver by using the properties.Web property from your WebDeleted(SPWebEventProperties) or SiteDeleted(SPWebEventProperties) methods, a System.IO.FileNotFoundException is thrown rather than a simple a null reference (Nothing in Visual Basic) return.