1.11M Members

MVC Model cannot find definition


My error msg:

<td>@Html.DropDownListFor(model => model.listVendor_Id, Model.listVendor_Id)

CS1061: 'System.Collections.Generic.IEnumerable<PWIMS.ViewModel.POViewModel>' does not contain a definition for 'listVendor_Id' and no extension method 'listVendor_Id' accepting a first argument of type 'System.Collections.Generic.IEnumerable<PWIMS.ViewModel.POViewModel>' could be found (are you missing a using directive or an assembly reference?)

The listVendor_Id after "Model." wasa underline in red. How to solve this?


If Model is the class, and model is the instance, use model instead.


I think you should Write the controller Code
TO help You

This article has been dead for over six months: Start a new discussion instead
Start New Discussion
View similar articles that have also been tagged: