Mvc
Mvc copied to clipboard
How to write select in mvc 6
Hi there, can you help me that "". How to write select tag in mvc6 using taghelper.
<select id='sel_gender' name=sel_gender>
<option selected value="">I am...</option>
<option value="male">Male</option>
<option value="female">Female</option>
</select>
This throws an error
<select asp-for='LastName" name='dddsd'>
<option value="male">Male</option>
</select>
see screenshot

I found where was the issue. fixed it.