Click here to Skip to main content
15,892,746 members
Please Sign up or sign in to vote.
1.44/5 (3 votes)
See more:
@Html.DropDownListFor(x => x.Course_tbl.CourseId, ViewBag.course as SelectList, "select catagory")

What I have tried:

<pre> @Html.DropDownListFor(x => x.Course_tbl.CourseId, ViewBag.course as <pre> 'IEnumerable<selectlistitem>'   "select catagory")
Posted
Comments
Richard MacCutchan 12-Oct-18 8:59am    
You cannot make a single integer type into an IEnumerable.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900