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

Razor Page

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

The example below demonstrates how to pass antiforgery token when a Button is clicked. See the implementation details in the example below, and for the full project with RazorPages examples, visit our GitHub repository.

    @inject Microsoft.AspNetCore.Antiforgery.IAntiforgery Xsrf

    <form method="post">
        <input type="text" name="description">
            .HtmlAttributes(new { type = "submit" })
            .Events(e => e.Click("onClick"))

<form method="post">
    <input type="text" name="description">
    <br />
    <kendo-button name="primaryTextButton"

        function onClick() {
            return kendo.antiForgeryTokens();

    public class ButtonIndexModel : PageModel
        public void OnPost(string description)

See Also

In this article