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

Events

The CheckBox for ASP.NET Core exposes the Change() event that you can use for capturing the CheckBox's value during user interaction.

Handling by Handler Name

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

    @(Html.Kendo().CheckBox()
        .Name("CheckBox")
        .Events(e => e
            .Change("change")
        )
    )
    <script>
        function change(e) {
            // Handle the change event.
        }
    </script>
    <kendo-checkbox name="checkbox" on-change="change"></kendo-checkbox>
    <script>
        function change(e) {
            // Handle the change event.
        }
    </script>

Handling by Template Delegate

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

    @(Html.Kendo().CheckBox()
        .Name("checkbox")
        .Events(e => e
            .Change(@<text>
              function(e) {
                  // Handle the change event inline.
              }
            </text>)
        )
    )
    <kendo-checkbox name="checkbox"
              on-change="function() {
                 // Handle the change event inline.
              }">
    </kendo-checkbox>

Next Steps

See Also

In this article