HtmlControl 构造函数

定义

初始化 HtmlControl 类的新实例。Initializes a new instance of the HtmlControl class.

重载

HtmlControl()

使用默认值初始化 HtmlControl 类的新实例。Initializes a new instance of the HtmlControl class using default values.

HtmlControl(String)

使用指定的标记初始化 HtmlControl 类的新实例。Initializes a new instance of the HtmlControl class using the specified tag.

HtmlControl()

使用默认值初始化 HtmlControl 类的新实例。Initializes a new instance of the HtmlControl class using default values.

public:
 HtmlControl();
protected:
 HtmlControl();
public HtmlControl ();
protected HtmlControl ();
Public Sub New ()
Protected Sub New ()

注解

此构造函数用于使用默认值创建和初始化类的新实例 HtmlControlThis constructor is used to create and initialize a new instance of the HtmlControl class using default values.

备注

不会直接创建此类的新实例。A new instance of this class is not created directly. 此构造函数是从其他 HTML 控件类的构造函数调用的,用于初始化此类中定义的属性。This constructor is called from the constructor of other HTML control classes to initialize properties defined in this class.

下表显示了实例的初始属性值 HtmlControlThe following table shows the initial property value for an instance of HtmlControl.

propertiesProperty 初始值Initial Value
TagName "Span" 文本字符串。The "span" literal string.

适用于

HtmlControl(String)

使用指定的标记初始化 HtmlControl 类的新实例。Initializes a new instance of the HtmlControl class using the specified tag.

public:
 HtmlControl(System::String ^ tag);
protected:
 HtmlControl(System::String ^ tag);
public HtmlControl (string tag);
protected HtmlControl (string tag);
new System.Web.UI.HtmlControls.HtmlControl : string -> System.Web.UI.HtmlControls.HtmlControl
Public Sub New (tag As String)
Protected Sub New (tag As String)

参数

tag
String

指定控件标记名称的字符串。A string that specifies the tag name of the control.

注解

此构造函数用于 HtmlControl 使用指定的标记创建和初始化类的新实例。This constructor is used to create and initialize a new instance of the HtmlControl class using the specified tag.

备注

不会直接创建此类的新实例。A new instance of this class is not created directly. 此构造函数是从其他 HTML 控件类的构造函数调用的,用于初始化此类中定义的属性。This constructor is called from the constructor of other HTML control classes to initialize properties defined in this class.

下表显示了实例的初始属性值 HtmlControlThe following table shows the initial property value for an instance of HtmlControl.

propertiesProperty 初始值Initial Value
TagName tag 参数的值。The value of the tag parameter.

适用于