Asp.net Button Server Control


Button Control
A Button Web Server control is a control which we click and release to perform some action. The default event of the Button is the Click event.
Source code

<asp:Button ID="Button1" runat="server" onclick="Button1_Click"
        Text="Click here" />

<asp:Label ID="Label1" runat="server">asp:Label>

Code File

protected void Button1_Click(object sender, EventArgs e)
    {
        Label1.Text = DateTime.Now.ToString();
    }

0 comments:

Post a Comment