Perhaps its my ignorance about how Razor/Html
helper works, hopefully someone from this forum will be able to throw light :)
I cant seem to get a simple lamda expression evaluated inside the html helper.
my razor view is strongly bound to the type "BrandViewModel
" and then the following code that is supposed to bind the list of brands(Brands property) to a drop down box
@{Html.DropDownListFor((x) => x.BrandId, x.Brands);}
fails with the following error. The name 'x' does not exist in the current context
the intellisense does confirm those properties (BrandId and Brands) exist in the model and it shows the same when i type x.
Thanks in advance.