Razor Page
This article describes how to configure the Telerik UI Window for ASP.NET Core in a RazorPage scenario.
The example below demonstrates how to load content in Window from the server. 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
@Html.AntiForgeryToken()
@(Html.Kendo().Window()
.Name("window")
.Title("Window title")
.Content(@<text>
<p>
@Model.Text
</p>
</text>)
.Actions(actions => actions
.Minimize()
.Maximize()
.Close()
)
.Width(600)
)
@inject Microsoft.AspNetCore.Antiforgery.IAntiforgery Xsrf
@Html.AntiForgeryToken()
@{
string[] actions = new string[] { "Minimize", "Maximize", "Close" };
}
<kendo-window name="window" title="Window title" actions="@actions">
<content><p>@Model.Text</p></content>
</kendo-window>
public string Text = String.Empty;
public void OnGet()
{
Text = "Lorem ipsum dolor sit amet...";
}