2014-04-01 144 views
0

我正在使用ASP.NET MVC 4以及Kendo UI。如何使用Ajax加載TabStrip內容,請記住有不同的視圖(.cshtml)。Kendo UI Tab Strip

最後的TabStrip項(動作,控制器)從不加載。

@(Html.Kendo().TabStrip() 
       .Name("tabstrip") 
       .Items(tabstrip => 
       { 
        tabstrip.Add().Text("Dimensions & Weights") 
         .Selected(true) 
         .LoadContentFrom(Url.Content("~/Content/tabstrip/ajax/ajaxContent1.html")); 

        tabstrip.Add().Text("Engine") 
         .LoadContentFrom(Url.Content("~/Content/tabstrip/ajax/ajaxContent2.html")); 

        tabstrip.Add().Text("Chassis") 
         .LoadContentFrom("AjaxLoadedPersonalItem", "Home"); 
         //.Content(Html.Action("AjaxLoadedPersonalItem", "Home").ToString()); 
       }) 
     ) 

回答

1

您確定您在Views/Home下有一個視圖調用AjaxLoadedPersonalItem?

這是我可以看到這個不加載的唯一原因。

比如我剛剛試過下面的代碼和它工作得很好

enter image description here

這是我加入MVC項目

要將控制器 enter image description here

結構

及相應視圖

enter image description here

這是結果:

enter image description here

希望它可以幫助