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.Web.UI (in CMS.PortalEngine.Web.UI.dll) Version: 13.0.131
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