Click or drag to resize
ControlsHelperGetParentPropertyParentControlType, PropertyType Method
Gets property value from parent control

Namespace: CMS.Base.Web.UI
Assembly: CMS.Base.Web.UI (in CMS.Base.Web.UI.dll) Version: 11.0.0
Syntax
C#
public static PropertyType GetParentProperty<ParentControlType, PropertyType>(
	Control control,
	Func<ParentControlType, PropertyType> propFunc,
	PropertyType defaultValue
)
where ParentControlType : Control

Parameters

control
Type: System.Web.UIControl
Control
propFunc
Type: SystemFuncParentControlType, PropertyType
Function that gets property value
defaultValue
Type: PropertyType
Default property value if no suitable parent control found

Type Parameters

ParentControlType
PropertyType

Return Value

Type: PropertyType
See Also