Click or drag to resize
PortalHelperAddNewWidget Method
Adds the new widget to the page and returns its instance.

Namespace: CMS.PortalControls
Assembly: CMS.PortalControls (in CMS.PortalControls.dll) Version: 9.0.0
Syntax
C#
public static WebPartInstance AddNewWidget(
	int widgetId,
	string zoneId,
	WidgetZoneTypeEnum zoneType,
	bool isLayoutZone,
	PageTemplateInstance templateInstance,
	DataRow row = null
)

Parameters

widgetId
Type: SystemInt32
The widget id
zoneId
Type: SystemString
The zone id
zoneType
Type: CMS.PortalEngineWidgetZoneTypeEnum
Type of the widget zone
isLayoutZone
Type: SystemBoolean
Indicates whether the zone is a layout zone
templateInstance
Type: CMS.PortalEnginePageTemplateInstance
The template instance
row (Optional)
Type: System.DataDataRow
The data of the new widget

Return Value

Type: WebPartInstance
See Also