Control.EnsureID 方法

定义

为尚未分配标识符的控件创建标识符。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.

适用于