asp.net - How to use Triggers in UpdatePanel

Triggers in asp.net ajax UpdatePanel
UsingTriggers.aspx

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

<!DOCTYPE html>
<script runat="server">
    protected void Button1_Click(object sender, EventArgs e)
    {
        ListBox1.ForeColor = System.Drawing.Color.DodgerBlue;
    }
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>Ajax Triggers - How to use Triggers in asp.net ajax UpdatePanel</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <h2 style="color:SeaGreen; font-style:italic;">Ajax Triggers Example: How To Use Triggers</h2>
        <hr width="450" align="left" color="DarkSeaGreen" />
        <asp:ScriptManager 
            ID="ScriptManager1"
            runat="server"
            >
        </asp:ScriptManager>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <asp:ListBox 
                    ID="ListBox1"
                    runat="server"
                    ForeColor="Crimson"
                    BackColor="Snow"
                    Font-Bold="true"
                    Font-Italic="true"
                    Font-Size="X-Large"
                    Font-Names="Comic Sans MS"
                    Width="250"
                    >
                    <asp:ListItem>Crimson</asp:ListItem>
                    <asp:ListItem>SeaGreen</asp:ListItem>
                    <asp:ListItem>DarkSeaGreen</asp:ListItem>
                    <asp:ListItem>DodgerBlue</asp:ListItem>
                    <asp:ListItem>Salmon</asp:ListItem>
                    <asp:ListItem>DarkSalmon</asp:ListItem>
                    <asp:ListItem>Cyan</asp:ListItem>
                    <asp:ListItem>Red</asp:ListItem>
                </asp:ListBox>
            </ContentTemplate>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="Button1" EventName="Click" />
            </Triggers>
        </asp:UpdatePanel>
        <br /><br />
        <asp:Button 
            ID="Button1"
            runat="server"
            ForeColor="DodgerBlue"
            Font-Bold="true"
            Text="Change ListBox Text Color"
            OnClick="Button1_Click"
            Height="45"
            />
    </div>
    </form>
</body>
</html>
Related asp.net ajax examples