I want a select HTML element on my page to display the choice of billers for making a payment. In addition to the options for billers I want to display a default option "Select" in the select element. I am using DropDownListFor of Html helper as given below:
@Html.DropDownListFor(m => m.BillerId, new SelectList(Model.Billers,
"BillerId", "BillerName", "Select"), new { @class = "form-control" })
@Html.ValidationMessageFor(m => m.BillerId, "", new { @class = "text-danger" })
The HTML output I get is as given below:
<select class="form-control valid" data-val="true" data-val-number="The field BillerId must be a number." id="BillerId" name="BillerId">
<option value="1">Idea</option>
<option value="2">Airtel</option>
</select>
The default value Select is not showing up. Please let me know if I am mistaking anything.