System.Web.UI.HtmlControls Namespace HtmlGenericControl Class
Initializes a new instance of the HtmlGenericControl class using default values.
[ VB ]
Overloads Public Sub New ( )
[ C# ]
public HtmlGenericControl ( );
[ C++ ]
public: HtmlGenericControl ( );
[ JScript ]
public function HtmlGenericControl ( );
This constructor sets the initial TagName property value to span.
The below code shows how to create a new instance of the HtmlGenericControl class using the default constructor.
[ VB ]
Sub Button_Click ( sender As Object, e As EventArgs )
Dim myControl As New HtmlGenericControl ( )
Message.InnerHtml = "New HtmlGenericControl Tag Name = " & myControl.TagName
End Sub 'Button_Click
[ C# ]
void Button_Click ( object src, EventArgs e ) {
HtmlGenericControl myControl = new HtmlGenericControl ( );
Message.InnerHtml="New HtmlGenericControl Tag Name = " + myControl.TagName;
}
[ JScript ]
function Button_Click ( sender : Object, e : EventArgs ) {
var myControl : HtmlGenericControl = new HtmlGenericControl ( )
Message.InnerHtml = "New HtmlGenericControl Tag Name = " + myControl.TagName
}
HtmlGenericControl Members HtmlGenericControl Constructor Overload List