I use this code to display a drop down menu list in my View, I would like to add a STATIC value at the beginning of the List with text like None and value as “”. How to do it in Razor?
@Html.DropDownListFor(modal => modal.Candidates, new SelectList(Model.Candidates, "Value", "Key"))
There is an overload of
DropDownListForwhich takes on a default string, e.g.