Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

SPWebCollection.Delete Method

Deletes the website with the specified website-relative URL from the collection.

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

public void Delete(
	string strWebUrl
)

Parameters

strWebUrl
Type: System.String

A string that contains the website URL relative to the root website in the site collection. For example, if the website to delete is located at http://MyServer/sites/MySiteCollection/DeleteSubsite, specify DeleteSubsite, or if it is located at http://MyServer/sites/MySiteCollection/Subsite/DeleteSubsite, specify Subsite/DeleteSubsite.

Show:
© 2015 Microsoft