title: How to align radiobutton list values horizontally and vertically in mvc4?
body: <p>I have around 35 radio button list values to be displayed in my view using @html.RadioButtonFor html helper in a .cshtml page.</p>
  
  <p>I want to display in 9 columns and 4 rows.</p>
  
  <p>In Asp.net using control properties of  like "RepeatLayout", "RepeatDirection", "RepeatColumns" we could achieve this.</p>
  
  <p>Same thing I want to apply it for mvc4.Is there any way to implement the same?</p>
  
  <p>Please help!</p>
  
  <p>Controller code:</p>
  
  <pre><code>ViewBag.Ratio = query.Select(m =&gt; new SelectListItem { Value = m.RatioID, Text = m.Ratio_Description });
  </code></pre>
  
  <p>.cshtml code</p>
  
  <pre><code> &lt;td colspan="3" &gt;
  
              @foreach (var item in (IEnumerable&lt;SelectListItem&gt;)ViewBag.Ratio)
                    { 
                           @Html.RadioButtonFor(m =&gt; m.RatioType, new { @item.Value, @item.Text })
                          &lt;label for = "@item.Value"&gt;@item.Text&lt;/label&gt;
  
                    }
  
  
              &lt;/td&gt;
  </code></pre>