Bind multiple radiobuttons to individual booleans
<p><strong>Background</strong></p>

<p>I have a model containing three bools</p>

<pre><code>public class PageDataModel
{
    public bool setting1 { get; set; }
    public bool setting2 { get; set; }
    public bool setting3 { get; set; }
}
</code></pre>

<p>If one value is true, the others must be false.</p>

<p>In my view, I am displaying three radio buttons:</p>

<p><a href="https://i.stack.imgur.com/d2nLO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/d2nLO.png" alt="Enter image description here"></a></p>

<p>The Razor code for my view:</p>

<pre><code>&lt;div class="row"&gt;
        &lt;div class="radio"&gt;
            @if (Model.Setting1)
            {
                @Html.RadioButtonFor(m =&gt; m.Setting1,  "Setting1", new { Checked = "checked", Name = "Group"})
            }
            else
            {
                @Html.RadioButtonFor(m =&gt; m.Setting1, "Setting1", new { Name = "Group"})
            }

            @Html.Label("Setting1")
        &lt;/div&gt;
        &lt;div class="radio"&gt;
            @if (Model.Setting2)
            {
                @Html.RadioButtonFor(m =&gt; m.Setting2, "Setting2", new { Checked = "checked", Name = "Group" })
            }
            else
            {
                @Html.RadioButtonFor(m =&gt; m.Setting2, "Setting2", new { Name = "Group"})
            }
            @Html.Label("Setting2")
        &lt;/div&gt;
        &lt;div class="radio"&gt;
            @if (Model.Setting3)
            {
                @Html.RadioButtonFor(m =&gt; m.Setting3, "Setting3", new { Checked = "checked", Name = "Group" })
            }
            else
            {
                @Html.RadioButtonFor(m =&gt; m.Setting3, "Setting3", new { Name = "Group"})
            }
            @Html.Label("Setting3")
        &lt;/div&gt;
        &lt;button type="submit" class="btn btn-default"&gt;Save&lt;/button&gt;
    &lt;/div&gt;
</code></pre>

<p>In my controller, I am returning a model with setting1 set to true:</p>

<pre><code>var model = new PageDataModel
        {
            Setting1 = true,
            Setting2 = false,
            Setting3 = false
        };
        return View(model);
</code></pre>

<p>This works correctly, the page is loaded with the 'setting 1' radio button checked.</p>

<p><strong>The problem</strong></p>

<p>When I submit the form, the posted model contains all false values, regardless of which radio button was checked.</p>

<p>I've tried changing the value from "setting1" to true/false, but that had no impact on the returned data.</p>

<p>I'm fairly sure I'm not setting up the binding properly, but I'm not sure where I'm going wrong.</p>

<p>All other examples I have found are binding two radio buttons to one bool value (for example, a yes/no pair of radio buttons bound to one bool). I can change the code to use one int property, but I'd like to solve this using bools.</p>

<p>What am I doing wrong? Am I misusing radio buttons here?</p>