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

Chat 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 Chat for ASP.NET Core in Razor Pages applications.

This article showcases how to configure a basic Chat component in a Razor Pages scenario.

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

    @inject Microsoft.AspNetCore.Antiforgery.IAntiforgery Xsrf

        .Toolbar(toolbar =>
            toolbar.Buttons(buttons =>
                buttons.Add().Name("Bold").IconClass("k-icon k-i-bold");
                buttons.Add().Name("Italic").IconClass("k-icon k-i-italic");
                buttons.Add().Name("Underline").IconClass("k-icon k-i-underline");
    @inject Microsoft.AspNetCore.Antiforgery.IAntiforgery Xsrf

    <kendo-chat name="chat">
        <toolbar toggleable="true" scrollable="true">
                <button name="Bold" icon-class="k-icon k-i-bold" />
                <button name="Italic" icon-class="k-icon k-i-italic" />
                <button name="Underline" icon-class="k-icon k-i-underline" />
    public void OnGet()


See Also

In this article