I am trying to use the SelectExtensions.DropDownListFor method, but there are very few examples on the interweb and only one or two on stackoverflow. I can't get my drop down to work.
Here is an extract on my .cshtml:
@SelectExtensions.DropDownListFor( m => m.LegalEntity.Address.Country.SelectedCountry,
new SelectList( Model.LegalEntity.Address.Country.Countries,
"CountryId", "Name",
Model.LegalEntity.Address.Country.Countries.First().CountryId))
I have been following the format of a stackoverflow post (MVC3 DropDownListFor - a simple example?), but I can't get it to work. Both IntelliSense and the compiler complain that the LegalEntity does not exist in the model, but it does. IntelliSense can't offer any suggestions for the Func in the first line.
What am I doing wrong??
Mark