PublishingWeb.AddPublishingPage Method (String, PageLayout, SPFolder)
Creates a new PublishingPage object in the PublishingWeb.
Namespace: Microsoft.SharePoint.Publishing
Assembly: Microsoft.SharePoint.Publishing (in Microsoft.SharePoint.Publishing.dll)
Syntax
'Declaration
Public Function AddPublishingPage ( _
name As String, _
layout As PageLayout, _
folder As SPFolder _
) As PublishingPage
'Usage
Dim instance As PublishingWeb
Dim name As String
Dim layout As PageLayout
Dim folder As SPFolder
Dim returnValue As PublishingPage
returnValue = instance.AddPublishingPage(name, _
layout, folder)
public PublishingPage AddPublishingPage(
string name,
PageLayout layout,
SPFolder folder
)
Parameters
name
Type: System.StringThe name of the new PublishingPage object.
layout
Type: Microsoft.SharePoint.Publishing.PageLayoutThe layout template (SPFile) used to render the new PublishingPage object.
folder
Type: Microsoft.SharePoint.SPFolderThe layout folder (SPFolder) object that is used to store the new PublishingPage object.
Return Value
Type: Microsoft.SharePoint.Publishing.PublishingPage
Returns PublishingPage.