May 12, 2021 ASP.NET
ASP.NET button control is used to set buttons, this section describes the use of button controls.
The Button control is used to display a down button.
The Button control is used to display a down button. T he down button may be a submit button or a command button. By default, this control is a submit button.
The submit button has no command name, and when it is clicked, it sends the page back to the server. You can write event handles that control the execution of actions when the submit button is clicked.
The command button has a command name and allows you to create multiple Button controls on the page. You can write time handles that control the execution of actions when the command button is clicked.
The properties and properties of the Button control are listed on our WebForms control reference manual page.
The following example demonstrates a simple Button control:
Forms are usually submitted at the click of a button.
In the following example, we .aspx a TextBox control, a Button control, and a Label control in the file. W hen the submit button is triggered, the submit sub-routine is executed. The submit sub-routine writes a line of text to the Label control: