Try using the overload of SelecList
, in your controller, where you specify the text and data fields:
HomePageModel hpm = new HomePageModel();
hpm.LayerItem = new SelectList(this.GetGroupLayers(), "DataField", "TextField");
return View(hpm);
"DataField" and "TextField" should be the names of the respective properties on GroupLayerInfo
you want in these places.
And then in your view:
@Html.DropDownListFor(y => y.SelectedLayerName, Model.LayerItem)