Is there a simple way to add a \"--Please select--\" default option to a DropDownListFor in MVC 3?
I wanted to set the default value to whatever was passed in as a Url Parameter called SiteType:
@Html.LabelFor(model => model.Type, new { @class = "control-label col-md-2" })
@Html.DropDownListFor(model => model.Type, ChangeOrderSite.SiteTypeNames.Select(s => new SelectListItem { Text = s.Value, Value = s.Key.ToString(), Selected = s.Key.ToString() == Request["SiteType"] }), new { @class = "control-label col-md-2" })
@Html.ValidationMessageFor(model => model.Type)
My drop down is a list of Site Types.