1
私はビューに複数選択リストを持っていて、ユーザーリストをコントローラに送信しています。私のビューはユーザーを受け取りますが、コントローラーには戻っていません。私は何が欠けていますか?MultiSelectListはビューデータを返しません
私のコントローラは次のようになります。私の見解で
// GET:
public ActionResult Create(User user)
{
ViewModel model = new ViewModel();
Interaction interact = new Interaction();
model.Users= Repository.GetUsers();
model.Interacao = interact;
return View(model);
}
、リストボックスがある:私は間違っているところ
@Html.ListBoxFor(model => model.Users, new MultiSelectList(Model.Users, "Id", "Name"))
は誰でも教えてもらえますか?