using DropdownlistFor helper for a list of names

前端 未结 2 1392
逝去的感伤
逝去的感伤 2021-01-24 18:34

I know it was silly to ask this question but I\'m not able to figure it out and I need your help guys.

First of all I am new to MVC. In my Project I am using a dropdownl

2条回答
  •  遇见更好的自我
    2021-01-24 19:20

    I think i spotted the problem, you need to do the following two things to resolve,

    1) change the model property public IList InterviewerName to public string InterviewerName

    2) use ViewBag to take the selectlist values to the View.

    Let me know if it helps.

提交回复
热议问题