I have encountered an issue with my HTML form in an ASP.NET MVC project that uses two radio buttons.
Below is a snippet of my model:
[Display(Name = "Gender")]
public string gender { get; set; }
In the view, I am using HTML helpers to declare these radio buttons:
<label class="col-sm-3 control-label">@Html.LabelFor(a => a.gender)</label>
<div class="col-sm-9 row">
<div class="radio-btn pull-left mRight-20">
@Html.RadioButtonFor(model => model.gender, "male")
@Html.LabelFor(a => a.gender, "Male")
</div>
<div class="radio-btn pull-left">
@Html.RadioButtonFor(model => model.gender, "female")
@Html.LabelFor(a => a.gender, "Female")
</div>
</div>
The problem I am facing is that only the male radio button is clickable. When I try to click on the female radio button, it also selects the male option. Any insights into why this might be happening?