radio button group in mvc

Grouping Radio Buttons in MVC

Radio buttons should only allow the user to select a single option out of multiple.

Gender option with radio button to select either Male or Female.


@Html.RadioButtonFor(model => model.Male, "male", new { id = "male" })

<label for="male"> Male </label>

@Html.RadioButtonFor(model => model.Female, "female", new { id = "female" })

<label for="female"> Female </label>


radio button group in mvc radio button group in mvc Reviewed by Bhaumik Patel on 9:04 PM Rating: 5