title: MVC RadioButtonFor Challenge to gen jQueryMobile Compliant HTML
body: <p>I am working in .NET, VB Razor MVC4 with JQueryMobile.</p>
  
  <p>My issue is in trying to get the @Html.RadioButtonFor to generate properly formatted HTML to get picked up by the JQuery Mobile. </p>
  
  <p>This code:</p>
  
  <pre><code>@For Each fqi In Model.Options
  @&lt;label for="@fqi.Id"&gt;@fqi.Text&lt;/label&gt;
  @&lt;input type="radio" name="@fqi.Name" id="@fqi.Id" value="@fqi.Value" checked="@fqi.Checked"/&gt;          
  Next
  </code></pre>
  
  <p>Generates:</p>
  
  <pre><code>&lt;div class="ui-radio"&gt;
  &lt;label class="ui-btn ui-radio-off ui-corner-left ui-btn-up-d" for="rb-yes_8e3b50fa-5d47-4d42-8c0c-dba8f840fedb" data-theme="d"&gt;
  &lt;span class="ui-btn-inner ui-corner-left"&gt;
  &lt;span class="ui-btn-text"&gt;Yes&lt;/span&gt;
  &lt;/span&gt;
  &lt;/label&gt;
  &lt;input id="rb-yes_8e3b50fa-5d47-4d42-8c0c-dba8f840fedb" type="radio" checked="False" value="Yes" name="8e3b50fa-5d47-4d42-8c0c-dba8f840fedb"&gt;
  &lt;/div&gt;
  &lt;div class="ui-radio"&gt;
  &lt;label class="ui-btn ui-radio-off ui-corner-right ui-controlgroup-last ui-btn-up-d" for="rb-no_8e3b50fa-5d47-4d42-8c0c-dba8f840fedb" data-theme="d"&gt;
  &lt;span class="ui-btn-inner ui-corner-right ui-controlgroup-last"&gt;
  &lt;span class="ui-btn-text"&gt;No&lt;/span&gt;
  &lt;/span&gt;
  &lt;/label&gt;
  &lt;input id="rb-no_8e3b50fa-5d47-4d42-8c0c-dba8f840fedb" type="radio" checked="False" value="No" name="8e3b50fa-5d47-4d42-8c0c-dba8f840fedb"&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>But I cant get this code right:</p>
  
  <pre><code>@For Each fqi In Model.Options
  @Html.LabelFor(Function(m) m.CurrentValue, fqi.Text)
  @Html.RadioButtonFor(Function(m) m.CurrentValue, New with {.value = fqi.Value,  .name=fqi.Name, .checked=fqi.Checked})
  Next
  </code></pre>
  
  <p>It is rendering as:</p>
  
  <pre><code>&lt;div class="ui-radio"&gt;
  &lt;div class="ui-radio"&gt;
  &lt;label class="ui-btn ui-radio-off ui-input-text ui-corner-left ui-btn-up-d" for="Questions_1__CurrentValue" data-theme="d"&gt;
  &lt;span class="ui-btn-inner ui-corner-left"&gt;
  &lt;span class="ui-btn-text"&gt;
  &lt;span class="ui-btn-inner"&gt;
  &lt;/span&gt;
  &lt;/span&gt;
  &lt;/label&gt;
  &lt;label class="ui-btn ui-radio-off ui-input-text ui-corner-right ui-controlgroup-last ui-btn-up-d" for="Questions_1__CurrentValue" data-theme="d"&gt;
  &lt;span class="ui-btn-inner"&gt;
  &lt;span class="ui-btn-text"&gt;
  &lt;span class="ui-btn-inner ui-corner-right ui-controlgroup-last"&gt;
  &lt;/span&gt;
  &lt;/span&gt;
  &lt;/label&gt;
  &lt;input id="Questions_1__CurrentValue" type="radio" value="{ value = No, name = 8e3b50fa-5d47-4d42-8c0c-dba8f840fedb, checked = False }" name="Questions[1].CurrentValue"&gt;
  &lt;/div&gt;
  &lt;input id="Questions_1__CurrentValue" type="radio" value="{ value = Yes, name = 8e3b50fa-5d47-4d42-8c0c-dba8f840fedb, checked = False }" name="Questions[1].CurrentValue"&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/aEQcn.png" alt="screen shot of radio button issue"></p>