System.Web.UI.HtmlControls Namespace HtmlInputButton Class
Initializes a new instance of an HtmlInputButton class using the specified button type.
[ VB ]
Overloads Public Sub New ( _
ByVal type As String _
)
[ C# ]
public HtmlInputButton (
String type
);
[ C++ ]
public: HtmlInputButton (
String* type
);
[ JScript ]
public function HtmlInputButton (
type : String
);
- type
- The input button type.
The following table shows the different possible values for the type parameter.
Value |
Description |
button |
A command button. |
submit |
A button that submits the form to the server. |
reset |
A button that clears the form. |
This constructor sets the initial TagName property value to the value of the given type parameter.
The below code shows how to create a new instance of an HtmlInputButton control using the overloaded constructor.
void SubmitBtn_Click ( Object source, EventArgs e ) {
HtmlInputButton mySubmitButton = new HtmlInputButton ( "submit" );
}
Sub SubmitBtn_Click ( source As Object, e As EventArgs )
Dim mySubmitButton As New HtmlInputButton ( "submit" )
End Sub |
|
C# |
VB |
HtmlInputButton Members HtmlInputButton Constructor Overload List