하나의보기에 2 개의 SelectList를 표시하고 싶습니다. 그래서 분명히, 나는 오직 ActionResult를 사용하여 뷰를 렌더링 할 수 있습니다.하나의 동작 결과로 다중 선택 목록을 반환하십시오.
public ActionResult IndexStudents(Docent docent, int lessonid, int classid)
{
return View(new SelectList(docent.ReturnStudentsNormalAsString(lessonid, classid)));
return View(new SelectList(docent.ReturnStudentsNoClassAsString(lessonid, classid)));
}
물론 이것은 작동하지 않습니다. 내가 어떻게 고칠 수 있니? 어쩌면 사전을 사용하고 있을까요?
내가 원하는 같은 내 출력의 모양을
<div class="editor-field">
<%: Html.DropDownList("IndexStudentsNormal",
Model as SelectList) %>
</div>
<div class="editor-field">
<%: Html.DropDownList("IndexStudentsNoClass",
Model as SelectList) %>
</div>
그래서 2 개 모델, 각 selectList의 하나 ... 레슨에 가입되지 않은 학생들과 일반 학생들과 함께 하나 하나를 사용하고 싶습니다 .
어떻게하면됩니까?