SPLimitedWebPartManager.AddWebPart Method
Adds a dynamic Web Part to the WebPartPage.
Namespace: Microsoft.SharePoint.WebPartPages
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Syntax
'Declaration
Public Sub AddWebPart ( _
webPart As WebPart, _
zoneId As String, _
zoneIndex As Integer _
)
'Usage
Dim instance As SPLimitedWebPartManager
Dim webPart As WebPart
Dim zoneId As String
Dim zoneIndex As Integer
instance.AddWebPart(webPart, zoneId, zoneIndex)
public void AddWebPart(
WebPart webPart,
string zoneId,
int zoneIndex
)
Parameters
- webPart
Type: System.Web.UI.WebControls.WebParts.WebPart
- zoneId
Type: System.String
- zoneIndex
Type: System.Int32