title: Unable to pass RadioButton group selected value to Controller
body: <p>I have a ViewModel defined as:</p>
  
  <pre><code>    public class Fixtures
      {
          public int Id { get; set; }
          public string HomeTeam { get; set; }
          public string AwayTeam { get; set; }
          public string HomeTeamCode { get; set; }
          public string AwayTeamCode { get; set; }
          public string League { get; set; }
          public bool Home { get; set; }
          public bool Draw { get; set; }
          public bool Away { get; set; }
          public string FixturePrediction { get; set; }
      }
  </code></pre>
  
  <p>My view displays a list of these fixtures and for each fixture, I have a radio button grouping. I need some way of passing the selected radio button for each fixture to my Post method. My View and controller are as below:</p>
  
  <p>View:</p>
  
  <pre><code>&lt;div class="container"&gt;
      @using (Html.BeginForm())
      {
          @Html.AntiForgeryToken()
          @Html.ValidationSummary(true, "", new { @class = "text-danger" })
  
          for (int i = 0; i &lt; Model.Count(); i++)
          {
              @Html.HiddenFor(model =&gt; model[i].Id)
  
              &lt;div class="col-sm-6"&gt;
                  &lt;div class="panel panel-primary panel-fixture"&gt;
                      &lt;div class="panel-heading text-center fixturetitle"&gt;
                          @Html.DisplayFor(model =&gt; model[i].HomeTeam) v @Html.DisplayFor(model =&gt; model[i].AwayTeam)
                          @Html.HiddenFor(model =&gt; model[i].HomeTeam)
                          @Html.HiddenFor(model =&gt; model[i].AwayTeam)
                      &lt;/div&gt;
                      &lt;div class="panel-body"&gt;
                          &lt;div class="container-fluid"&gt;
                              &lt;div class="row"&gt;
                                  &lt;div class="col-xs-4 text-center"&gt;
                                      &lt;img src="~/Content/Images/@string.Concat(Model[i].HomeTeamCode, ".png")" class="fixturecrest" /&gt;
                                      &lt;div class="text-center"&gt;
                                          @Html.DisplayFor(model =&gt; model[i].HomeTeamCode)
                                          @Html.HiddenFor(model =&gt; model[i].HomeTeamCode)
                                      &lt;/div&gt;
                                  &lt;/div&gt;
                                  &lt;div class="col-xs-4 text-center"&gt;
                                      &lt;label class="text-center"&gt;
                                          V &lt;br /&gt;
                                      &lt;/label&gt;
                                  &lt;/div&gt;
                                  &lt;div class="col-xs-4 text-center"&gt;
                                      &lt;img src="~/Content/Images/@string.Concat(Model[i].AwayTeamCode, ".png")" class="fixturecrest" /&gt;
                                      &lt;div class="text-center"&gt;
                                          @Html.DisplayFor(model =&gt; model[i].AwayTeamCode)
                                          @Html.HiddenFor(model =&gt; model[i].AwayTeamCode)
                                      &lt;/div&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                              &lt;hr /&gt;
                              &lt;div class="row"&gt;
                                  &lt;div class="text-center" role="group" aria-label="Fixture Prediction"&gt;
                                      &lt;div class="col-xs-4 text-center"&gt;
                                          &lt;button type="button" class="btn btn-xs btn-default"&gt;
                                              HOME
                                              @Html.RadioButtonFor(model =&gt; model[i].FixturePrediction, Model[i].Home, new { @Name = Model[i].Id })
                                              @Html.HiddenFor(model =&gt; model[i].FixturePrediction)
                                              &lt;span class="glyphicon glyphicon-check"&gt;&lt;/span&gt;
                                          &lt;/button&gt;
                                      &lt;/div&gt;
                                      &lt;div class="col-xs-4 text-center"&gt;
                                          &lt;button type="button" class="btn btn-xs btn-default"&gt;
                                              DRAW
                                              @Html.RadioButtonFor(model =&gt; model[i].FixturePrediction, Model[i].Draw, new { @Name = Model[i].Id })
                                              @Html.HiddenFor(model =&gt; model[i].FixturePrediction)
                                              &lt;span class="glyphicon glyphicon-check"&gt;&lt;/span&gt;
                                          &lt;/button&gt;
                                      &lt;/div&gt;
                                      &lt;div class="col-xs-4 text-center"&gt;
                                          &lt;button type="button" class="btn btn-xs btn-default"&gt;
                                              AWAY
                                              @Html.RadioButtonFor(model =&gt; model[i].FixturePrediction, Model[i].Away, new { @Name = Model[i].Id })
                                              @Html.HiddenFor(model =&gt; model[i].FixturePrediction)
                                              &lt;span class="glyphicon glyphicon-check"&gt;&lt;/span&gt;
                                          &lt;/button&gt;
                                      &lt;/div&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          }
          &lt;input type="submit" value="Confirm Predictions" class="btn btn-success" /&gt;
      }
  &lt;/div&gt;
  </code></pre>
  
  <p>Post Method in Controller:</p>
  
  <pre><code>[HttpPost]
  [ValidateAntiForgeryToken]
  public ActionResult Test(IEnumerable&lt;Fixtures&gt; test)
  {
      if (ModelState.IsValid)
      {
  
      }
  
      return RedirectToAction("Test");
  }
  </code></pre>
  
  <p>My field <code>FixturePrediction</code> is always null and I have attempted several variations of the 'radiobuttonfor' shown above.</p>
  
  <p>All I need is to assign a value to <code>FixturePrediction</code> based on which radiobutton is selected. What am I missing?</p>
  
  <p>Thanks in advance.</p>