Mvc icon indicating copy to clipboard operation
Mvc copied to clipboard

How to write select in mvc 6

Open rahuldhariya01 opened this issue 11 years ago • 1 comments

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 erroraspmvc

rahuldhariya01 avatar Jun 08 '15 13:06 rahuldhariya01

I found where was the issue. fixed it.

rahuldhariya01 avatar Jun 08 '15 15:06 rahuldhariya01