Click or drag to resize
WebPartZoneInstanceAddWebPart Method (Int32, Int32)
Adds a web part instance of a specified type to the webparts.

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

Parameters

webPartId
Type: SystemInt32
Web part code name
position (Optional)
Type: SystemInt32
The position of the web part in the target zone

Return Value

Type: WebPartInstance
See Also