Control.FindControl Method (String, Int32)

This method supports the .NET Framework infrastructure and is not intended to be used directly from your code.
Searches the current naming container for a server control with the specified id and an integer, specified in the pathOffset parameter, which aids in the search. You should not override this version of the FindControl method.

Namespace: System.Web.UI
Assembly: System.Web (in system.web.dll)

protected virtual Control FindControl (
	string id,
	int pathOffset
protected Control FindControl (
	String id, 
	int pathOffset
protected function FindControl (
	id : String, 
	pathOffset : int
) : Control
Not applicable.



The identifier for the control to be found.


The number of controls up the page control hierarchy needed to reach a naming container.

Return Value

The specified control, or a null reference (Nothing in Visual Basic) if the specified control does not exist.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0