SiteMap  | About    

Button Control

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.



<html xmlns="">
<head id="Head1" runat="server">
	<title>Untitled Page</title>
	<form id="form1" runat="server">
	   <asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />
	   <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>

Click the following links to see full source code

C# Source Code
VB.NET Source Code
default.aspx.vb (C) 2018    Founded by raps mk
All Rights Reserved. All other trademarks are property of their respective owners.