This is my 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; }
}
and inside my view I have problems this code aint working:
@model NKI3.ViewModels.IndexViewModel
@using (Html.BeginForm()) {
<fieldset>
<div class="editor-label">
@Html.DropDownListFor(model => model.Sname)
</div>
</fieldset>
}
The error message I get is ” No overload for method ‘DropDownListFor takes 1 argument “
Whats the solution?
Thanks!
View: