2012-08-31 90 views
2

Kendo UI的Window控件的Content和LoadContentFrom屬性有什麼不同。主頁上有兩個按鈕。每個按鈕都有單獨的窗口控件來調用相應的局部視圖。如果我使用內容方法,客戶索引最初加載,即在頁面加載時。如果我使用LoadContentFrom,當窗口變得可見時,DOM控件被加載。內容和LoadContentFrom之間的區別

例如,

@(Html.Kendo().Window() 
    .Name("CustomerWindow") 
    .Title("Customer") 
    .Content(@<text> 
@Html.Partial("../Customer/Index") 
</text>) 
    .Draggable() 
    .Resizable() 
    .Width(736) 
    .Visible(false) 
) 

@(Html.Kendo().Window() 
    .Name("CustomerWindow") 
    .Title("Customer")  
     .LoadContentFrom("../Customer/Index") 
    .Draggable() 
    .Resizable() 
    .Width(736) 
    .Visible(false) 
    .Modal(true) 
) 

我認爲它的延遲加載的概念,但我不知道確切的差異。

感謝 Santhosh

回答

2

LoadContentFrom的設置指定該窗口將加載使用Ajax請求的URL。 Content定義窗口的靜態HTML內容。