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

Splitter in Razor Pages

Updated on Dec 10, 2025

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

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

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

Razor
    @page
    @model SplitterIndexModel

    @inject Microsoft.AspNetCore.Antiforgery.IAntiforgery Xsrf
    @Html.AntiForgeryToken()

    <h1>SplitterIndex</h1>

    @(Html.Kendo().Splitter()
        .Name("vertical")
        .Orientation(SplitterOrientation.Vertical)
        .Panes(verticalPanes =>
        {
            verticalPanes.Add()
                .HtmlAttributes(new { id = "top-pane" })
                .Scrollable(false)
                .Collapsible(false)
                .Content(
                  Html.Kendo().Splitter()
                      .Name("horizontal")
                      .HtmlAttributes(new { style = "height: 100%;" })
                      .Panes(horizontalPanes =>
                      {
                          horizontalPanes.Add()
                              .HtmlAttributes(new { id = "left-pane" })
                              .Size("220px")
                              .Collapsible(true)
                              .Content(@<div class="pane-content">
                                          <h3>Inner splitter / left pane</h3>
                                          <p>Resizable and collapsible.</p>
                                        </div>);
    
                          horizontalPanes.Add()
                              .HtmlAttributes(new { id = "center-pane" })
                              .Content(@<div class="pane-content">
                                          <h3>Inner splitter / center pane</h3>
                                          <p>Resizable only.</p>
                                        </div>);
    
                          horizontalPanes.Add()
                              .HtmlAttributes(new { id = "right-pane" })
                              .Collapsible(true)
                              .Size("220px")
                              .Content(@<div class="pane-content">
                                          <h3>Inner splitter / right pane</h3>
                                          <p>Resizable and collapsible.</p>
                                        </div>);
                      }).ToHtmlString()
                );
    
            verticalPanes.Add()
                .Size("100px")
                .HtmlAttributes(new { id = "middle-pane" })
                .Collapsible(false)
                .Content(@<div class="pane-content">
                              <h3>Outer splitter / middle pane</h3>
                              <p>Resizable only.</p>
                          </div>);
    
            verticalPanes.Add()
                .Size("100px")
                .HtmlAttributes(new { id = "bottom-pane" })
                .Resizable(false)
                .Collapsible(false)
                .Content(@<div class="pane-content">
                              <h3>Outer splitter / bottom pane</h3>
                              <p>Non-resizable and non-collapsible.</p>
                          </div>);
        })
    )
    
    <style>
    	#vertical {
    		height: 380px;
    	}
    	#middle-pane {
    		color: #000;
    		background-color: #ccc;
    	}
    	#bottom-pane {
    		color: #000;
    		background-color: #aaa;
    	}
    	#left-pane, #center-pane, #right-pane {
    		color: #000;
    		background-color: #F5F5F5;
    	}
    	.pane-content {
    		padding: 0 10px;
    	}
    </style>

See Also

In this article
See Also
Not finding the help you need?
Contact Support