How to use ColorPickerExtender ClientColorSelectionChanged event

Ajax ColorPickerExtender OnClientColorSelectionChanged event
OnClientColorSelectionChangedEvent.aspx

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

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<!DOCTYPE html>

<script runat="server">
     
</script>
<script type="text/javascript">
    function selectedColorChanged(sender) {
        document.getElementById('CheckBoxList1').style.color = "#" + sender.get_selectedColor();
    }
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>Ajax ColorPickerExtender OnClientColorSelectionChanged event - How to use</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <h2 style="color:DeepPink; font-style:italic;">Ajax ColorPickerExtender Example: OnClientColorSelectionChanged event</h2>
        <hr width="725" align="left" color="Pink" />
        <asp:ScriptManager 
            ID="ScriptManager1"
            runat="server"
            >
        </asp:ScriptManager>
        <cc1:ColorPickerExtender 
            ID="ColorPickerExtender1"
            runat="server"
            TargetControlID="TextBox1"
            OnClientColorSelectionChanged="selectedColorChanged"
            >
        </cc1:ColorPickerExtender>
        <br /><br />
        <asp:CheckBoxList 
            ID="CheckBoxList1"
            runat="server"
            Font-Names="Comic Sans MS"
            RepeatColumns="2"
            Width="350"
            BackColor="FloralWhite"
            ForeColor="Crimson"
            BorderColor="Pink"
            BorderWidth="2"
            >
            <asp:ListItem>Crimson</asp:ListItem>
            <asp:ListItem>Red</asp:ListItem>
            <asp:ListItem>DarkSeaGreen</asp:ListItem>
            <asp:ListItem>FloralWhite</asp:ListItem>
            <asp:ListItem>Snow</asp:ListItem>
        </asp:CheckBoxList>
        <br />
        <asp:Label 
            ID="Label1"
            runat="server"
            Text="Select CheckBoxList text color"
            >
        </asp:Label>
        <br />
        <asp:TextBox 
            ID="TextBox1"
            runat="server"
            >
        </asp:TextBox>
    </div>
    </form>
</body>
</html>
Related asp.net ajax examples