New to Telerik UI for ASP.NET CoreStart a free 30-day trial

Use an Inline Editor in Editor Templates

Updated on Dec 10, 2025

Environment

ProductTelerik UI for ASP.NET Core Editor
Progress Telerik UI for ASP.NET Core version2024.4.1112

Description

How can I use an inline Editor in an editor template and submit its value?

Solution

When you add the inline Editor component in a form through an ASP.NET Core Editor template, its value will not be posted with the form. The reason for that is the inline mode that renders a DOM element, which is not a form field. Therefore, the value is not submitted with the form. To handle this scenario, customize the Editor template by adding a hidden input and update it when the content of the Editor changes.

Razor
    @model string

    @(Html.Kendo().EditorFor(model => model)
        .Name(Html.NameFor(model => model) + "_Editor")
        .Tag("div")
        .Tools(tools => tools.Clear().Bold().Italic().Underline())
        .Events(events => events.Change(@"function (ev){
            var hiddenInput =  $('#" + Html.NameFor(model => model) + @"');
            hiddenInput.val(ev.sender.value());
            hiddenInput.change();
        }"))
    )

    @Html.HiddenFor(model => model)

More ASP.NET Core Editor Resources

See Also