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

Razor Page

This article describes how to configure the Telerik UI ColorPicker for ASP.NET Core in a RazorPage scenario.

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

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


    @(Html.Kendo().ColorPicker()
        .Name("picker") 
        .ClearButton(Model.ClearButton)
        .Buttons(Model.Buttons)
        .Value(Model.Value)
    )


    public bool ClearButton { get; set; }   
    public bool Buttons { get; set; }
    public string Value { get; set; }

    public void OnGet()
    {
        ClearButton = true;
        Buttons = false;
        Value = "#94ed67";
    }

See Also

In this article