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 HtmlHelper for ASP.NET Core in a RazorPage.

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

    @inject Microsoft.AspNetCore.Antiforgery.IAntiforgery Xsrf
    @Html.AntiForgeryToken()

    @(Html.Kendo().Switch()
            .Name("switch")
            .Checked(Model.IsChecked)
        )


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

In this article
Not finding the help you need? Improve this article