# Events

The Telerik UI Slider for ASP.NET MVC exposes [`Change`](https://www.telerik.com/aspnet-mvc/documentation/api/kendo.mvc.ui.fluent/slidereventbuilder#changesystemstring) and [`Slide`](https://www.telerik.com/aspnet-mvc/documentation/api/kendo.mvc.ui.fluent/slidereventbuilder#slidesystemstring) events that allow you to control the behavior of the UI component.

For a complete example, refer to the [demo on using the Slider events](https://demos.telerik.com/aspnet-mvc/slider/events).

## Handling by Handler Name

The following example demonstrates how to subscribe to events by a handler name.

```Razor HtmlHelper
    @(Html.Kendo().Slider()
        .Name("slider")
        .Events(e => e
            .Change("change")
            .Slide("slide")
        )
    )

    <script>
        function change(e) {
            // Handle the change event.
        }

        function slide(e) {
            // Handle the slide event.
        }
    </script>
```

## Handling by Template Delegate

The following example demonstrates how to subscribe to events by a template delegate.

```Razor HtmlHelper
    @(Html.Kendo().Slider()
        .Name("slider")
        .Events(e => e
            .Change(@<text>
              function(e) {
                  // Handle the change event inline.
              }
            </text>)
            .Slide(@<text>
              function(e) {
                  // Handle the slide event inline.
              }
              </text>)
        )
    )
```

## See Also

* [Client-Side API of the Slider](https://docs.telerik.com/kendo-ui/api/ui/slider)
* [Server-Side API of the Slider HtmlHelper](https://www.telerik.com/aspnet-mvc/documentation/api/slider)
