在我的.cshtml主视图中,我有一个TabPanel应该是一个GridPanel。 gridPanel在.cshtml PartialView中定义。我的问题是如何在主视图中定义的TabPanel中显示gridPanel? 我的代码如下:
mainView.cshtml
@model IEnumerable<Models.warning>
//...
TabPanel lowerPanel = new TabPanel
{
Title = "Lower Panel",
Region = Region.South,
// .....
Items =
{
// Call the partial view here to display gridPanel
}
};
_gridPanelPartialView.cshtml
@model IEnumerable<Models.warning>
<table>
<tr>
<th>
source
</th>
//....
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.source)
</td>
//...
}
</table>