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

Window in Razor Pages

Razor Pages is an alternative to the MVC pattern that makes page-focused coding easier and more productive. This approach consists of a cshtml file and a cshtml.cs file (by design, the two files have the same name).

You can seamlessly integrate the Telerik UI Window for ASP.NET Core in Razor Pages applications.

This article describes how to configure the Window component in a Razor Pages scenario.

For the complete project, refer to the Window in Razor Pages example.

    @inject Microsoft.AspNetCore.Antiforgery.IAntiforgery Xsrf

        .Title("Window title")
        .Actions(actions => actions
    @inject Microsoft.AspNetCore.Antiforgery.IAntiforgery Xsrf

        string[] actions = new string[] { "Minimize", "Maximize", "Close" };

    <kendo-window name="window" title="Window title" actions="@actions">

    public string Text = String.Empty;
    public void OnGet()
        Text = "Lorem ipsum dolor sit amet...";

See Also

In this article