WebPartGallerySource.AddItemToPage Method
When overridden in a derived class, adds the WebPartGalleryItem represented by the WebPart to the page.
Namespace: Microsoft.SharePoint.WebPartPages
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Syntax
'Declaration
Public MustOverride Sub AddItemToPage ( _
zone As WebPartZoneBase, _
zoneIndex As Integer, _
item As WebPartGalleryItem, _
wpid As String _
)
'Usage
Dim instance As WebPartGallerySource
Dim zone As WebPartZoneBase
Dim zoneIndex As Integer
Dim item As WebPartGalleryItem
Dim wpid As String
instance.AddItemToPage(zone, zoneIndex, _
item, wpid)
public abstract void AddItemToPage(
WebPartZoneBase zone,
int zoneIndex,
WebPartGalleryItem item,
string wpid
)
Parameters
zone
Type: System.Web.UI.WebControls.WebParts.WebPartZoneBaseThe zone to which the item is added.
zoneIndex
Type: System.Int32The index position of a WebPart within its zone.
item
Type: Microsoft.SharePoint.WebPartPages.WebPartGalleryItemThe item to add to the page.
wpid
Type: System.StringThe ID of the WebPart.
Remarks
This method is an abstract method that must be implemented in the derived class.