# Events

The Telerik UI ListBox for ASP.NET Core [exposes a number of events](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/listboxeventbuilder) that allow you to control the behavior of the UI component.

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

## Handling by Handler Name

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

```Razor HtmlHelper
    @(Html.Kendo().ListBox()
        .Name("listbox")
        .Events(e => e.Change("onChange"))
        ... //Additional configuration
    )

    <script>
        function onChange(e){
            // Handle the ListBox Change event that triggers when a specified item has been selected.
        };
    </script>
```

```Razor TagHelper
    <kendo-listbox name="listbox" on-change="onChange">
      
    </kendo-listbox>

    <script>
        function onChange(e){
            // Handle the ListBox Change event that triggers when a specified item has been selected.
        };
    </script>
```

## Handling by Template Delegate

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

```Razor HtmlHelper
    @(Html.Kendo().ListBox()
        .Name("listbox")
        .Events(e => e.Change(@<text>
                function() {
                    // Handle the ListBox Change event inline.
                }
            </text>)
        )
        ... //Additional configuration
    )
```

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

## Next Steps

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

## See Also

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