May 10, 2012, 10:01 AM
[CLOSED] [MVC] Cascading multi Partial views
Hi, I try to use Partial view in Ext.NET.
/Home/Index.cshtml:
And I have another problem: The HeaderCtrl does not show with Chrome and Firefox, but It works with IE
/Home/Index.cshtml:
@Html.X().ResourceManager().Theme(UIHelper.PORTAL_THEME).Locale("fr")
@(Html.X().Viewport()
.Layout("BorderLayout")
.Items(vpitem => {
//North
vpitem.Add(Html.X().Panel().ContentFromPage(this, "/Views/UserControls/HeaderCtrl.cshtml")
.Region(Region.North));
//Center
vpitem.Add(Html.X().Panel()
.Region(Region.Center)
.ID("centerPanel")
.Height(600)
.Title("Home").Header(false)
.AutoDoLayout(true)
.Loader(new ComponentLoader {
AutoLoad = true,
// DisableCaching = true,
Url = "http://localhost/",
ReloadOnEvent = true,
LoadMask = {
ShowMask = true,
Msg = "loading..."
}
}));
//West
vpitem.Add(Html.X().Panel()
.Width(200)
.Region(Region.West)
.Layout("AccordionLayout").Split(true).Header(false)
.Collapsible(true)
.Border(true)
.Items(w => w.AddRange(UIHelper.LoadAllRightsByUser().ToArray()))
);
})
)
/UserControl/HeaderCtrl.cshtml@Html.X().Toolbar().Flat(true).Items(toolBar =>
{
toolBar.Add(Html.X().Container().ID("SearchBox").ContentFromPage(this, "Views/UserControls/SearchCtrl.cshtml"));
})
When I run the project, it shows this error:The file "/Views/UserControls/Views/UserControls/SearchCtrl.cshtml" could not be rendered, because it does not exist or is not a valid page.
How can I put some partial view in HeaderCtrl.cshtml?And I have another problem: The HeaderCtrl does not show with Chrome and Firefox, but It works with IE
Last edited by Daniil; May 10, 2012 at 2:22 PM.
Reason: [CLOSED]