I wanted to make a radio button list which is bound to a model in asp.net core. But, I also wanted the unique labels to be clickable and associated with each radio button. I have this:
<fieldset>
<div>
<span>
<input type="radio" required asp-for="Email" value="EmailYes" /> <b>Send Email:</b> They will be sent an email.
</span>
</div>
<div>
<span>
<input type="radio" required asp-for="Email" value="EmailNo" /> <b>Do Not Send Email:</b> They will not be sent an email.
</span>
</div>
</fieldset>
I've tried adding a label like so:
<label asp-for="EmailYes"><b>Send Email:</b> They will be sent an email. </label>
But when the user clicks on the second label, it selects the first radio button.
Thanks.