title: MVC 5 - Each iteration of foreach loop creates new radio button group. How can I access results in the controller?
body: <p>I'm creating an MVC 5 web app. 
  In the view I am creating a table and iterating through a foreach loop to create a row with 3 radio buttons in each row, each row being a radio button group.
  The radio buttons are all pre-populated.</p>
  
  <p>After I hit submit, I need to get the value of each group of radio buttons to use in the Controller.</p>
  
  <p><strong>Problematic code from the view</strong></p>
  
  <pre><code>        @using (Html.BeginForm("Submit", "Home"))
          {
              &lt;table&gt;
                  &lt;tr&gt;&lt;td&gt;Application&lt;/td&gt;&lt;td&gt;Direct Debit only&lt;/td&gt;&lt;td&gt;Credit and Debit&lt;/td&gt;&lt;td&gt;Neither&lt;/td&gt;&lt;/tr&gt;
                  @{
                      int i = 0;
  
                      foreach (var app in Model.Applications)
                      {
                          i++;
                          string appCardType = "app" + i;
                          &lt;tr&gt;
                              &lt;td&gt;@app.Value.Name&lt;/td&gt;
                              &lt;td&gt;&lt;input type="radio" name="@appCardType" @(app.Value.CardType.ToString() == "DebitOnly" ? "checked" : "" ) /&gt;&lt;/td&gt;
                              &lt;td&gt;&lt;input type="radio" name="@appCardType" @(app.Value.CardType.ToString() == "CreditAndDebit" ? "checked" : "" ) /&gt;&lt;/td&gt;
                              &lt;td&gt;&lt;input type="radio" name="@appCardType" @(app.Value.CardType.ToString() == "Neither" ? "checked" : "" ) /&gt;&lt;/td&gt;
                          &lt;/tr&gt;
                      }
                  }
              &lt;/table&gt;
  
              &lt;input type="submit" value="Apply Settings" /&gt;
          }
  </code></pre>
  
  <p><strong>the (currently empty) controller</strong></p>
  
  <pre><code>    public ActionResult Submit()
      {
  
  
          return View();
      }
  </code></pre>
  
  <p>Anyone know how I can access the data provided by the user in the controller?</p>
  
  <p>Cheers</p>