Hi fairly new to using MVC radio buttons开发者_如何学编程. I have some code:
@Html.RadioButtonFor(modelItem => item.CheckerApproved, true)
<label for="?">Accepted</label>
@Html.RadioButtonFor(modelItem => item.CheckerApproved, false)
<label for="?">Rejected</label>
As you can see I'm not sure how to associate the label with the radiobutton.
Can someone please help me with this?
Use the LabelFor
helper.
@Html.LabelFor(m => m.CheckerApproved)
精彩评论