SPWeb.Recycle Method

Sends the website to the recycle bin.

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

Syntax

'Declaration
Public Sub Recycle
'Usage
Dim instance As SPWeb

instance.Recycle()
public void Recycle()

Exceptions

Exception Condition
SPException

The website is a root web.

NotSupportedException

The website cannot be restored.

Remarks

The website can be restored or permanently deleted from the recycle bin.

See Also

Reference

SPWeb Class

SPWeb Members

Microsoft.SharePoint Namespace