preciso criar um Insert de vários campos ao mesmo tempo! Meu sistema tem várias tabela e relacionamentos e estou com dificuldades nesse ponto. Tenho essa tela de cadastro:
Com esse código:
@using (Html.BeginForm()){
<div style="width: 100%; float: left;">
<table class="table table-bordered table-hover">
<thead>
<tr>
<th style="width:200px; text-align:center; vertical-align:middle;">Alunos</th>
<th style="width:150px; text-align:center; vertical-align:middle;">Atribuir Nota</th>
</tr>
</thead>
<tbody>
@{
for (int i = 0; i < Model.ListaMatriculas.Count(); i++)
{
<tr>
<td>@Model.ListaMatriculas[i].Aluno.Nome</td>
<td style="text-align:center;">
<input type="hidden" name="Matricula.IdMatricula" value="@Model.ListaMatriculas[i].IdMatricula" />
<input type="text" name="Nota" value="0" style="width: 30px;" />
@Html.DropDownList("UnidadeCurricular.IdUnidadeCurricular", ViewBag.unidadecurricular_idunidadecurricular as SelectList, "")
</td>
</tr>
}
}
</tbody>
</table>
<div class="alert alert-success">
<b>Obs: Notas devem possuir valores de 0 a 100.</b>
</div>
</div>
<div style="width: 100%;">
<button class="btn btn-sucsess " type="submit">Salvar</button>
</div>
}
No entanto quando eu clico no enviar meu controller não recebe os valores dos campos, alguém pode me dar um Help, como posso fazer algo assim? Um link de exemplo ou algo do tipo...