Control.EnsureID Control.EnsureID Control.EnsureID Control.EnsureID Method

定義

為尚未指定識別項的控制項,建立識別項。Creates an identifier for controls that do not have an identifier assigned.

protected:
 void EnsureID();
protected void EnsureID ();
member this.EnsureID : unit -> unit
Protected Sub EnsureID ()

備註

EnsureID方法會為包含在另一個控制項中的控制項產生識別碼。The EnsureID method generates an identifier for controls that are contained in another control. 只有沒有指派ID給屬性之值的控制項, 才會產生識別碼。Identifiers are generated only for controls that do not have a value assigned to the ID property.

適用於