KendoUI: TabStrip HtmlHelper adding PartialVIews

2019-05-10 23:37发布

问题:

Inside KendoUI in MVC 3, I need to add a partialview for each tab as that tab's content.

How is this done, the docs don't seem to show a way.

回答1:

@{
    var partialData = Html.Partial("/Views/Templates/_p_myView.cshtml");
}
@(Html.Kendo().TabStrip()
    .Name("Contents from partital")
    .Items(tabstrip =>
    {
        tabstrip.Add().Text("Hello Partial")
            .Content(partialData .ToString());
    })
)