看法
@model IEnumerable<MyMixtapezServerCodeHomePage.Models.album>
@for(int i=0;i<userchoiceIndex;i++)
{
<div class="editor-label">
@Html.LabelFor(model => model.artist)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.artist)
@Html.ValidationMessageFor(model => model.artist)
</div>
}
控制器
[HttpPost]
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Create(IEnumerable<album> album)
{
}
是否可以?我想以更快、更简单的方式为数据库创建多个值。