title: RadiobuttonFor in Mvc Razor syntax
body: <p>I have three radio buttons and my field value type is <strong>integer</strong> like Maintenance for 3, 
  Active for 1 and Inactive for 2.</p>
  
  <pre><code>@Html.RadioButtonFor(model =&gt; model.StatusId, "3") Maintenance
  @if (Model.IsReady == true)
  {
      &lt;span&gt; @Html.RadioButtonFor(model =&gt; model.StatusId,"1") Active&lt;/span&gt;
  }
  @Html.RadioButtonFor(model =&gt; model.StatusId, "2") Inactive
  </code></pre>
  
  <p>i using above code then insert data properly but when my form open in edit mode then i have not got any radio button selected.</p>
  
  <p>and i also used below code but not get success.</p>
  
  <pre><code>@Html.RadioButtonFor(model =&gt; model.StatusId, "3", Model.StatusId == '3' ? new {Checked = "checked"} : null) Maintenance
  @if (Model.IsReady == true)
  {
      &lt;span&gt; @Html.RadioButtonFor(model =&gt; model.StatusId, "1",Model.StatusId == '1' ? new {Checked = "checked"} : null) Active&lt;/span&gt;
  }
  @Html.RadioButtonFor(model =&gt; model.StatusId, "2",Model.StatusId == '2' ? new {Checked = "checked"} : null) Inactive
  </code></pre>
  
  <p>so how to get selected radio button in edit mode</p>
  
  <p>thanks in advance</p>