I have a constructor that passes in an IEnumerable of an object and then expose it from a public variable of type SelectList. In the cshtml file It has been mapped to a DropDownListFor and the dropdown populates fine, However when I try to attach "None selected" to the dropdown it doesn't display in the screen e.g.
constructor of the view model:
IEnumerable<Partner> beneficiaryNames
setting the value in the constructor:
BeneficiaryNames = new SelectList(beneficiaryNames, "Id", "Name");
declaration in viewmodel:
public SelectList BeneficiaryNames { get; set; }
then in my view:
@Html.DropDownListFor(m => m.SearchRequest.BeneficiaryId, Model.BeneficiaryNames, "None selected")