I am using a drop-down list in one of my templates.
@Html.DropDownListFor(m => m.LastName, Model.LastNames, new { id = "LastName" })
When drop-down list is displayed and if I want to pre-select any values from the items for drop-down list, how can that be done?
In your model you can set selected to true for the list of last names like so…