Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Radio Button Tag Helper sets every radio button to checked

$
0
0

Both of these radio buttons will have checked="checked" on them.  Why would the tag helper add that.  How do you specify that none of them should be checked?

<div class="form-group">
<label>
<input name="Answer" type="radio" asp-for="Answer1" value="@Model.Answer1" /> @Model.Answer1
</label>
</div>

<div class="form-group">
<label>
<input name="Answer" type="radio" asp-for="Answer2" value="@Model.Answer2" /> @Model.Answer2
</label>
</div>


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>