.NET Framework Class Library Control..::.FindControl Method (String, Int32) This API 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)

Syntax
Protected Overridable Function FindControl ( _
id As String, _
pathOffset As Integer _
) As Control
protected virtual Control FindControl(
string id,
int pathOffset
)
protected:
virtual Control^ FindControl(
String^ id,
int pathOffset
)
abstract FindControl :
id:string *
pathOffset:int -> Control
override FindControl :
id:string *
pathOffset:int -> Control
Parameters- id
- Type: System..::.String
The identifier for the control to be found.
- pathOffset
- Type: System..::.Int32
The number of controls up the page control hierarchy needed to reach a naming container.
Return ValueType: System.Web.UI..::.ControlThe specified control, or nullNothingnullptra null reference (Nothing in Visual Basic) if the specified control does not exist.

Version Information
.NET FrameworkSupported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

Platforms
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role not supported), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

See Also
|
Riferimento a .NET Framework Metodo Control..::.FindControl (String, Int32) Questa API supporta l'infrastruttura .NET Framework e non deve essere utilizzata direttamente dal codice. Cerca nel contenitore di denominazione corrente un controllo server con il parametro id indicato e un intero, specificato nel parametro pathOffset, che agevola la ricerca. Non eseguire l'override di questa versione del metodo FindControl.
Spazio dei nomi:
System.Web.UI
Assembly:
System.Web (in System.Web.dll)

Sintassi
Protected Overridable Function FindControl ( _
id As String, _
pathOffset As Integer _
) As Control
protected virtual Control FindControl(
string id,
int pathOffset
)
protected:
virtual Control^ FindControl(
String^ id,
int pathOffset
)
abstract FindControl :
id:string *
pathOffset:int -> Control
override FindControl :
id:string *
pathOffset:int -> Control
Parametri- id
- Tipo: System..::.String
Identificatore del controllo da ricercare.
- pathOffset
- Tipo: System..::.Int32
Numero di controlli a livelli superiori della gerarchia dei controlli della pagina necessari per raggiungere un contenitore dei nomi.
Valore restituitoTipo: System.Web.UI..::.ControlIl controllo specificato oppure nullNothingnullptrriferimento null (Nothing in Visual Basic) se il controllo specificato non esiste.

Informazioni sulla versione
.NET FrameworkSupportato in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

Piattaforme
Windows 7, Windows Vista SP1 o versione successiva, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (componenti di base del server non supportati), Windows Server 2008 R2 (componenti di base del server supportati con SP1 o versione successiva), Windows Server 2003 SP2
.NET Framework non supporta tutte le versioni di ciascuna piattaforma. Per un elenco delle versioni supportate, vedere Requisiti di sistema di .NET Framework.

Vedere anche
|