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

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

Parameters

zoneId
Type: SystemString
Zone ID
webPart
Type: CMS.PortalEngineWebPartInstance
Web part
position (Optional)
Type: SystemInt32
Position index

Return Value

Type: WebPartInstance
Remarks
Returns a new instance of web part if the given web part is present within it's parent zone
See Also