1,105,384 Community Members

MVC Model cannot find definition

Member Avatar
RinzLove
Newbie Poster
20 posts since Mar 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

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?

Member Avatar
pritaeas
mod_pritaeas
11,315 posts since Jul 2006
Reputation Points: 1,420 [?]
Q&As Helped to Solve: 1,835 [?]
Skill Endorsements: 156 [?]
Moderator
Featured
Sponsor
 
0
 

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

Member Avatar
elsunhoty
Newbie Poster
11 posts since Jan 2014
Reputation Points: 0 [?]
Q&As Helped to Solve: 1 [?]
Skill Endorsements: 0 [?]
 
0
 

I think you should Write the controller Code
TO help You

You
Post:
Start New Discussion
View similar articles that have also been tagged: