title: ASP.NET MVC RadioButton Update Boolean
body: <p>I have a form:</p>
  
  <p><img src="https://i.stack.imgur.com/1LxHq.png" alt="Form"></p>
  
  <p>Where the user can add/update/remove names for a person.  The names are a <code>List&lt;NameViewModel&gt;</code> within the <code>PersonViewModel</code> I have an issue with the <code>Primary</code> radiobutton.  I need all the names to be in a radiobutton group, with only one Primary being allowed.  </p>
  
  <p>Currently, if I use <code>Html.RadioButtonFor</code> then all the buttons are given different names, and thus not in the same group, and their <code>IsPrimary</code> boolean properties don't get set on the postback.  I can use :</p>
  
  <pre><code>&lt;input type="radio" name="radioName"/&gt;
  </code></pre>
  
  <p>which keeps the grouping correct, but I'm not sure how to ensure the IsPrimary boolean property is correctly set on postback.  Can someone offer me guidance?  Thankyou very much.  </p>