이 내 뷰 모델MVC : 내 데이터베이스에서 데이터를 가져 와서 viewmodel을 사용하여 드롭 다운 목록에 데이터를 표시하는 방법은 무엇입니까?
public class IndexViewModel
{
public string QuestionText { get; set; }
public string Sname { get; set; }
public string Cname { get; set; }
public int CID { get; set; }
public int SID { get; set; }
public Question question { get; set; }
public CoreValue corevalue { get; set; }
public SubjectType subjecttype { get; set; }
}
하고 나의보기 안에 나는 문제를이 코드 아닌가요의 작업이 있습니다
내가 오류 메시지가 없습니다@model NKI3.ViewModels.IndexViewModel
@using (Html.BeginForm()) {
<fieldset>
<div class="editor-label">
@Html.DropDownListFor(model => model.Sname)
</div>
</fieldset>
}
"방법에 대한 과부하가 'DropDownListFor 1 개 인자를을"
해결책은 무엇입니까?
감사합니다.