PageLayoutCollection.Delete method

Removes a PageLayout object from a given SPFolder object.

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 name extension.

Exceptions

Exception Condition
UnauthorizedAccessException

The 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 not be empty and must be a string that is not null. The folder parameter must not be null.

See also

Reference

PageLayoutCollection class

PageLayoutCollection members

Microsoft.SharePoint.Publishing namespace

Delete