Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Adds the specified WebPart to the page.
Namespace: Microsoft.SharePoint.WebPartPages
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Syntax
'Declaration
Protected Overridable Sub AddItemToPage ( _
zone As WebPartZoneBase, _
zoneIndex As Integer, _
webPart As WebPart _
)
'Usage
Dim zone As WebPartZoneBase
Dim zoneIndex As Integer
Dim webPart As WebPart
Me.AddItemToPage(zone, zoneIndex, _
webPart)
protected virtual void AddItemToPage(
WebPartZoneBase zone,
int zoneIndex,
WebPart webPart
)
Parameters
zone
Type: System.Web.UI.WebControls.WebParts.WebPartZoneBaseThe zone to which the WebPartGalleryItem is added.
zoneIndex
Type: System.Int32The index position of the WebPart within its zone.
webPart
Type: System.Web.UI.WebControls.WebParts.WebPartThe Web Part to be added to the page.
Remarks
This method adds the WebPart to the page.
See Also
Reference
WebPartGallerySourceBase Class