モデルをコントローラに渡すことは可能@Html.Partial
ですか?
ビューでプレーンな<td>
行の戻りリストを使用しますが、これはフォーム送信時<td>
に部分的な戻りでラップされますnull
@using ( Html.BeginForm() )
{
<table>
<tr>
<th></th>
</tr>
<tr>
@for ( int i = 0; i < Model.Rows.Count; i++ )
{
@*<td class="row">Book @Html.DisplayFor(x => Model.Rows[i].RowNum) @Html.DropDownListFor(x => Model.Rows[i].Selected, Model.Rows[i].Data) </td>*@
@Html.Partial("Row", Model.Rows[i])
}
</tr>
</table>
<input type="submit" value="Submit" />
}