Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
GetParentControl method
Collapse the table of content
Expand the table of content

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)

public static Control GetParentControl(
	Control control,
	Type type


Type: System.Web.UI.Control

The child control.

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.
© 2015 Microsoft