# Events

You can subscribe to [all Rating events](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/ratingeventbuilder) and then use them to further customize the behavior of the component.

For a complete example on basic Rating events, refer to the [demo on using the events of the Rating](https://demos.telerik.com/aspnet-core/rating/events).

## Handling by Handler Name

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

```Razor HtmlHelper
    @(Html.Kendo().Rating()
            .Name("rating")
            .Events(e => {
                    e.Change("onChange");
                    e.Select("onSelect");
            })
    )
```

```Razor TagHelper
    <kendo-rating name="rating" on-change="onChange" on-select="onSelect"/>
```

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

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

## Handling by Template Delegate

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

```Razor HtmlHelper
    @(Html.Kendo().Rating()
        .Name("rating")
        .Events(e => e.Change(@<text>
                function() {
                    // Handle the change event.
                }
            </text>)
        )
    )
```

```Razor TagHelper
    <kendo-rating name="rating" 
        on-change="function() {
                    // Handle the change event.
                }"/>
```

## Next Steps

* [Using the Rating Events (Demo)](https://demos.telerik.com/aspnet-core/rating/events)

## See Also

* [Using the API of the Rating for ASP.NET Core (Demo)](https://demos.telerik.com/aspnet-core/rating/api)
* [Server-Side API of the Rating](https://www.telerik.com/aspnet-core-ui/documentation/api/rating)
* [Client-Side API of the Rating](https://docs.telerik.com/kendo-ui/api/ui/rating)
