Click or drag to resize
PageTemplateInstanceAddWebPart Method (String, Int32, Int32)
Adds the web part instance to the specified zone

Namespace: CMS.PortalEngine
Assembly: CMS.PortalEngine (in CMS.PortalEngine.dll) Version: 8.2.23
Syntax
C#
public WebPartInstance AddWebPart(
	string zoneId,
	int webPartId,
	int position = -1
)

Parameters

zoneId
Type: SystemString
Zone ID
webPartId
Type: SystemInt32
Web part ID
position (Optional)
Type: SystemInt32
The position of the web part in the target zone

Return Value

Type: WebPartInstance
See Also