# Events

The Telerik UI ColorPalette for ASP.NET MVC exposes a [`Change`](https://www.telerik.com/aspnet-mvc/documentation/api/kendo.mvc.ui.fluent/simplecolorpickereventbuilder#changesystemfunc) event that allows you to control the behavior of the UI component.

For a runnable example on the component `Change` event, refer to the [demo on using the events of the ColorPalette](https://demos.telerik.com/aspnet-mvc/colorpalette/events).

## Handling by Handler Name

The following example demonstrates how to subscribe to the `Change` event by a handler name.

```Razor HtmlHelper
    @(Html.Kendo().ColorPalette()
        .Name("colorpalette")
        .Events(e => e
            .Change("colorpalette_change")
        )
    )
```

```JS script
    <script>
        function colorpalette_change(e) {
            // Handle the change event.
            var colorpalette = this;
            console.log(colorpalette.value());
        }
    </script>
```

## Handling by Template Delegate

The following example demonstrates how to handle the `Change` event by a template delegate.

```Razor HtmlHelper
    @(Html.Kendo().ColorPalette()
          .Name("colorpalette")
          .Events(ev => ev
              .Change(@<text>
                function(e) {
                    // Handle the change event inline.
                    console.log(e.sender.value());
                }
                </text>)
          )
    )
```

## Next Steps

* [Using the ColorPalette Events (Demo)](https://demos.telerik.com/aspnet-mvc/colorpalette/events)

## See Also

* [ColorPalette Server-Side API for ASP.NET MVC](https://www.telerik.com/aspnet-mvc/documentation/api/colorpalette)
* [ColorPalette Client-Side API](https://docs.telerik.com/kendo-ui/api/ui/colorpalette)
