Apr 04, 2012, 10:07 PM
[Razor] How to add items to a Panel from a Partial View
It is possible to add items to a Panel from a Partial View? Something like this:
Thanks.
@(Html.X().Viewport()
.Layout(LayoutType.Border)
.Resizable(true)
.Split(true)
.Items(items =>
{
items.Add(Html.X().Panel().Title("Hola").Region(Region.West).Resizable(true).Width(200));
items.Add(Html.X().Panel().Title("Chao").Region(Region.Center).Items(items2 =>
{
Html.RenderPartial("_MyPartialView");
}));
})
)
It's certainly possible to add a UserControl as a Panel <content> using the ASPX engine but I can't figure out how to achieve it using Razor.Thanks.