SPUtility.GetParentControl method

Returns the control that is the parent of a specified control.

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Shared Function GetParentControl ( _
    control As Control, _
    type As Type _
) As Control
'Usage
Dim control As Control
Dim type As Type
Dim returnValue As Control

returnValue = SPUtility.GetParentControl(control, _
    type)
public static Control GetParentControl(
    Control control,
    Type type
)

Parameters

  • type
    Type: System.Type

    The type of the parent control.

Return value

Type: System.Web.UI.Control
The first control in the control tree that matches the specified type.

See also

Reference

SPUtility class

SPUtility members

Microsoft.SharePoint.Utilities namespace