asp.net - How to change Label text programmatically

Change Label text programmatically
LabelText.aspx

<%@ Page Language="C#" %>

<!DOCTYPE html>

<script runat="server">
    protected void Button1_Click(object sender, System.EventArgs e)
    {
        Label1.Text = "You clicked the Button";
    }
</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>How to set, change Label text programmatically</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <h2 style="color:Navy">Label Example: Text</h2>
        <asp:Label 
             ID="Label1" 
             runat="server"
             Text="Click button for change This text."
             ForeColor="Crimson"
             BackColor="LightPink"
             Font-Size="X-Large"
             >
        </asp:Label>
        <br /><br />
        <asp:Button 
             ID="Button1" 
             runat="server" 
             ForeColor="IndianRed"
             Text="Change Label Text"
             OnClick="Button1_Click"
             Font-Bold="true"
             />
    </div>
    </form>
</body>
</html>
More asp.net examples