Splitter RenderPartial

2 posts, 0 answers
  1. Simon831
    Simon831 avatar
    36 posts
    Member since:
    Sep 2005

    Posted 14 Aug 2012 Link to this post

    What is the correct way to use RenderPartial in a splitter?

    @(Html.Kendo().Splitter()
      .Name("vertical")
      .Orientation(SplitterOrientation.Vertical)
      .Panes(verticalPanes =>
      {
          verticalPanes.Add()
              .Size("100px")
              .HtmlAttributes(new { id = "top-pane" })
              .Collapsible(false)
               
              .Content(
                    @Html.RenderPartial("HeaderPartialView");
              );
  2. Darron
    Darron avatar
    1 posts
    Member since:
    Feb 2014

    Posted 21 Feb 2014 in reply to Simon831 Link to this post

    First create an ActionMethod that returns the partial

    public ActionResult Tasks()
            {
                return PartialView("_Tasks");
            }


    Then call .ToString() on the action

    @(Html.Kendo().Splitter()
        .Name("splitter")
        .Panes(panes =>
            {
                // load partial
                panes.Add().Content( Html.Action("Tasks").ToString() );
  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top