title: How can I add a class attribute to Html.BeginForm() in MVC3/4 preserving the minimal overload
body: <p>I'm in the process of upgrading my app to Bootstrap 2.1.1 and I need to add a class attribute (class="form-horizontal") to many of the form tags. The problem is, most of the forms use the rather beautiful</p>
  
  <pre><code>@using (Html.BeginForm()) {
  </code></pre>
  
  <p>format which I'd rather keep. The obvious way to get the class attribute in there is to use the following overload, for example:</p>
  
  <pre><code>@using (Html.BeginForm("Register", "Account", FormMethod.Post, new { @class = "form-horizontal" })) {
  </code></pre>
  
  <p>But I'd rather not do that. What is the best way to add a class attribute to my form?</p>
  
  <p>I've thought about using a <strong>jQuery</strong> document ready handler to .addClass("form-horizontal") to forms, but am worried that users would see the dreaded 'flash of unstyled content'.</p>
  
  <p>Another approach might be to use a <strong>less</strong>-style mix-in, to add the .form-horizontal class to all form style rules but I haven't used less yet, so I'm not sure about this one.</p>
  
  <p>Anyone know the best way to solve this problem?</p>