Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Returns the control that is the parent of a specified control.
Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Syntax
'Declaration
<SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.UnsupportedExternalType)> _
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)
[SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.UnsupportedExternalType)]
public static Control GetParentControl(
    Control control,
    Type type
)
Parameters
control
Type: System.Web.UI.ControlThe child control.
type
Type: System.TypeThe type of the parent control.
Return Value
Type: System.Web.UI.Control
The first control in the control tree that matches the specified type.