Table of contents
TOC
Collapse the table of content
Expand the table of content

PageExtensions.AddWebPartToWebPartPage Method

SharePoint Dev Documents|Last Updated: 5/20/2017
|
1 Contributor

Inserts a web part on a web part page

Namespace:Microsoft.SharePoint.Client
Assembly: OfficeDevPnP.Core.dll

Syntax

public static WebPartDefinition AddWebPartToWebPartPage(this Web web, WebPartEntity webPart, String page)

Parameters

web

  Type: Microsoft.SharePoint.Client.Web
  Site to be processed - can be root web or sub site

webPart

  Type: OfficeDevPnP.Core.Entities.WebPartEntity
  Information about the web part to insert

page

  Type: System.String
  Page to add the web part on

Return Value

Type: WebPartDefinition
Returns the added Microsoft.SharePoint.Client.WebParts.WebPartDefinition object

See also

© 2018 Microsoft