How to use ColorPickerExtender in asp.net ajax

ColorPickerExtender in asp.net ajax
UsingColorPickerExtender.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) {
        sender.get_element().style.color = "#" + sender.get_selectedColor();
        document.getElementById('Label1').style.color = "#" + sender.get_selectedColor();
    }
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>Ajax ColorPickerExtender - How to create and use ColorPickerExtender in asp.net ajax</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <h2 style="color:DarkGreen; font-style:italic;">Ajax ColorPickerExtender Example: How To Use</h2>
        <hr width="500" align="left" color="Green" />
        <asp:ScriptManager 
            ID="ScriptManager1"
            runat="server"
            >
        </asp:ScriptManager>
        <cc1:ColorPickerExtender 
            ID="ColorPickerExtender1"
            runat="server"
            TargetControlID="TextBox1"
            OnClientColorSelectionChanged="selectedColorChanged"
            >
        </cc1:ColorPickerExtender>
        <br /><br />
        <asp:Label 
            ID="Label1"
            runat="server"
            Text="change this text color"
            Font-Size="Large"
            Font-Names="Comic Sans MS"
            >
        </asp:Label>
        <br />
        <asp:TextBox 
            ID="TextBox1"
            runat="server"
            >
        </asp:TextBox>
    </div>
    </form>
</body>
</html>
Related asp.net ajax examples