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

Razor Page

This article demonstrates how to configure the Telerik UI Switch component for ASP.NET Core in a RazorPage.

For the full project with RazorPages examples, visit our GitHub repository.

    @inject Microsoft.AspNetCore.Antiforgery.IAntiforgery Xsrf


<kendo-switch name="switch" checked="Model.IsChecked"></kendo-switch>

    public bool IsChecked { get; set; }
    public void OnGet()
        IsChecked = true;

In this article