我有这样的看法,使我在那里用@ Html.Action菜单:错误4
@model SGP.Models.Turma
@{
ViewBag.Title = "Menu";
}
...
@Html.Action("AvaliacaoLista", "Turma", new { id = Model.TurmaId })
在Html.Action的观点:
@model List<SGP.Models.PessoaModel2>
@using (Html.BeginForm())
{
@Html.AntiForgeryToken()
@Html.ValidationSummary(true)
<th>Nome</th>
<th>Numero</th>
@foreach (String s in ViewBag.Componentes)
{
<th>@s</th>
}
<th>Nota Final</th>
</tr>
@for (int i = 0; i < Model.Count; i++)
{
<tr>
@Html.HiddenFor(x => Model[i].turmaId)
@Html.HiddenFor(x => Model[i].userid)
<td>@Model[i].nome</td>
<td>@Model[i].num</td>
@for (int a = 0; a < Model[i].am.Count; a++)
{
@Html.HiddenFor(x => Model[i].am[a].AvaliacaoId)
<td>@Html.DisplayFor(x => Model[i].am[a].nota)</td>
}
<td>@Model[i].notafinal</td>
</tr>
}
</table>
}
这是它在视图中显示的内容: 有人可以告诉我为什么这样做?或者我应该使用其他方式使该表出现在菜单中而不是使用Html.Action? 感谢 (我只想显示表,而不是重复标题)
确切的错误是什么? –
_“有人可以告诉我为什么这样做吗?” - - 什么是“这个”,究竟是什么? – CodeCaster
@PowerStar我只想显示表格,而不是重复“软件GestãoPedagógica”,“Bem vindo,ProfTeste” – dasdasd