Button control displays a push button control on the Web page. By default, a Button control is a Submit button. You can provide an event handler for the Click event to programmatically control the actions performed when the Submit button is clicked.

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Label1.Text = "Button Clicked !!"End Sub
protected void Button1_Click(object sender, EventArgs e)
{
Label1.Text = "Button Clicked !!";
}
The following ASP.NET program display a text in the label when the Button click event is performed.
Default.aspx
Untitled Page
Click the following links to see full source code
C# Source Code
VB.NET Source Code
ASP.NET Web Controls - Related Contents
Advertisement
ASP.NET Related Topics