New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Server-side Events

OnColorChanged:

RadColorPicker raises the OnColorChanged server side event once its value has been changed.

Set the AutoPostBack property in order for the event handler to be raised right after the value is changed on the client.

  • DefaultVB.aspx
  • DefaultVB.aspx.vb
<%@ Page Language="vb" AutoEventWireup="false" CodeFile="DefaultVB.aspx.vb" Inherits="Telerik.Web.Examples.ColorPicker.ServerSideEvents.DefaultVB" %>

<%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <div class="demo-containers">
        <div class="demo-container">
            <telerik:RadColorPicker RenderMode="Lightweight" ID="RadColorPicker1" Preset="Default" runat="server" AutoPostBack="true"
                OnColorChanged="RadColorPicker1_ColorChanged" PaletteModes="all">
            </telerik:RadColorPicker>
            <p>
                <strong>OnColorChanged:</strong>
                <asp:Label ID="Label1"
                    runat="server"></asp:Label>
            </p>
        </div>
    </div>

    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxSettingCreating="RadAjaxManager1_AjaxSettingCreating">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadColorPicker1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="Label1"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance