PageLayoutCollection.Delete Method
Removes a PageLayout from a given SPFolder.
Namespace: Microsoft.SharePoint.Publishing
Assembly: Microsoft.SharePoint.Publishing (in Microsoft.SharePoint.Publishing.dll)
Syntax
'Declaration
Public Sub Delete ( _
pageLayoutName As String, _
folder As SPFolder _
)
'Usage
Dim instance As PageLayoutCollection
Dim pageLayoutName As String
Dim folder As SPFolder
instance.Delete(pageLayoutName, folder)
public void Delete(
string pageLayoutName,
SPFolder folder
)
Parameters
- pageLayoutName
Type: System.String
Name of the PageLayout without a file extension.
- folder
Type: Microsoft.SharePoint.SPFolder
SPFolder that contains the given PageLayout.
Exceptions
Exception | Condition |
---|---|
UnauthorizedAccessException | Current user does not have sufficient permissions to perform this action. |
ArgumentNullException | Indicates that one of the input parameters is a null reference (Nothing in Visual Basic). |
Remarks
The pageLayoutName parameter must be a non-empty, non-null string. The folder parameter must be non-null.