Apr 26, 2012, 10:25 AM
[CLOSED] [MVC] How to add RenderBody, ActionLink in Ext.Net Controls
Hi,
I'm creating MVC webportal with Ext.Net. I created a ViewPort in _Layout.cshtml page. How can I add RenderBody or ActionLink in the Panel?
Here is my code:
_Layout.cshtml
I'm creating MVC webportal with Ext.Net. I created a ViewPort in _Layout.cshtml page. How can I add RenderBody or ActionLink in the Panel?
Here is my code:
_Layout.cshtml
@using Ext.Net
@using Ext.Net.MVC
<!DOCTYPE html>
<html lang="en">
<head>
<title>@ViewBag.Title - MVC-Ext.NET Application</title>
</head>
<body>
@Html.X().ResourceManager().Theme(Theme.Default);
@(Html.X().Viewport()
.Layout("BorderLayout")
.Items(item =>
{
item.Add(Html.X().Toolbar()
.Region(Region.North)
.Border(false)
.Height(50)
.Items(toolBar =>
{
toolBar.Add(Html.X().Label()
.Text("Web Portal")
);
toolBar.Add(Html.X().ToolbarFill());
//Here I want to add ActionLink to _LoginPartial.cshtml
})
.Height(35));
//Center
item.Add(Html.X().Panel()
.Height(610)
.Region(Region.Center)
.Border(true)
.ID("mainPanel").ItemsFromPage(this, "../Home/Index.cshtml")
//Here I want to add @RenderBody() to load the views
);
//West
item.Add(Html.X().Panel()
.Width(200)
.Region(Region.West)
.Layout("AccordionLayout")
.Title("ShortCut")
.Collapsible(true)
.Border(true)
.Items(westItem =>
{
westItem.Add(Html.X().MenuPanel()
.Icon(Icon.Folder)
.Title("ParentMenu1")
.ID("ParentMenu1")
.Menu(mpItem =>
{
mpItem.Add(Html.X().MenuItem()
.Icon(Icon.Information)
.Text("Menu1")
.ID("menu1")
);
mpItem.Add(Html.X().MenuItem()
.Icon(Icon.Information)
.Text("Menu2")
.ID("menu2")
);
}));
westItem.Add(Html.X().MenuPanel()
.Icon(Icon.Folder)
.Title("ParentMenu2")
.ID("ParentMenu2")
.Menu(mpItem =>
{
mpItem.Add(Html.X().MenuItem()
.Icon(Icon.Information)
.Text("Menu3")
.ID("menu3")
);
mpItem.Add(Html.X().MenuItem()
.Icon(Icon.Information)
.Text("Menu4")
.ID("menu4")
);
}));
})
);
//South
item.Add(Html.X().Toolbar()
.Height(25)
.Region(Region.South)
.Border(true)
.Items(toolBar =>
{
toolBar.Add(Html.X().ToolbarFill());
toolBar.Add(Html.X().ToolbarTextItem()
.Center()
.Text("Copyright ©2012. All rights reserved.")
);
toolBar.Add(Html.X().ToolbarFill());
})
);
}
)
)
</body>
</html>
And Is there any way to load dynamically content in mainPanel when I click the menu link in the West Panel?
Last edited by Daniil; Apr 27, 2012 at 1:08 PM.
Reason: [CLOSED]