0
How do I leave my Dropdownlistfor, like this select where the first field cannot be selected.
<select>
<option value="0" selected disabled>Selecionar</option>
<option value="1">SEMANAL</option>
<option value="2">MENSAL</option>
<option value="3">ANUAL</option>
</select>
...
@Html.DropDownListFor(s => s.MeetingFrequency, new SelectList(new List<Object> {
new { value = "0", text ="Selecionar"},
new { value = "SEMANAL", text = "Semanal" },
new { value = "MENSAL", text = "Mensal" },
new { value = "ANUAL", text = "Anual" }
}, "value", "text"))
Pretty sure that doesn’t work with
SelectList
– Jéf Bueno
It’s not worked
– Bruno H.
Sorry, I didn’t pay attention. It doesn’t work with selectList. It changes to Selectlistitem like LINQ, he replied. That’s right.
– Marcos Marques