RadioButtonList.FindControl(String, Int32) 方法

定義

在目前命名容器中,搜尋具有指定 ID 和路徑位移的伺服器控制項。 FindControl(String, Int32) 方法一律會傳回 RadioButtonList 物件。

protected:
 override System::Web::UI::Control ^ FindControl(System::String ^ id, int pathOffset);
protected override System.Web.UI.Control FindControl (string id, int pathOffset);
override this.FindControl : string * int -> System.Web.UI.Control
Protected Overrides Function FindControl (id As String, pathOffset As Integer) As Control

參數

id
String

所要尋找的控制項識別項。

pathOffset
Int32

在頁面控制項階層架構中,向上到達命名容器所需的控制項數目。

傳回

Control

目前的 RadioButtonList

備註

方法 FindControl 主要是由衍生自 類別的 RadioButtonList 自訂控制項中的控制項開發人員使用。

方法 FindControlControl.FindControl 覆寫基 Control 類的 方法。 您不應該覆寫這個版本的 Control.FindControl 方法。

適用於

另請參閱