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

Razor Page

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

The example below demonstrates how to pass antiforgery token when an action from the Dialog 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

        .Title("Data Update")
        .Content("<p>Would you like to confirm updating the data?<p>")
        .Actions(actions =>
            actions.Add().Text("Send data").Primary(true).Action("onSendData");

        function onSendData() {
                url: "/Dialog/DialogIndex",
                type: "POST",               
                headers: {
                    RequestVerificationToken: kendo.antiForgeryTokens().__RequestVerificationToken
                dataType: "json"

    public void OnPost()

See Also

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