Click or drag to resize

EAPCtrlUtilsClosestParent Method

Finds the closest parent control that "is" the specified type and, if cssClass is specified, has the specified CssClass.

Namespace:  NetQuarry
Assembly:  EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntax
public static Control ClosestParent(
	Control ctrl,
	Type parentType,
	string cssClass
)

Parameters

ctrl
Type: System.Web.UIControl
The control whose parent we're interested in.
parentType
Type: SystemType
The System.Type of the parent of interest or null if type does not matter.
cssClass
Type: SystemString
The CssClass of the parent of interest or null/empty if CssClass does not matter.

Return Value

Type: Control
The parent control, if found, else null.
See Also