title: How to add custom data attributes and classes to `@Html.EditorFor`?
body: <p>I want to add some custom attributes to the <code>input</code> generated by <code>@Html.EditorFor</code>, I tried the following:</p>
  
  <pre><code>@Html.EditorFor(model =&gt; model.Percent, new { @class = "percent" })
  </code></pre>
  
  <p>But it just ignores my class, from what I can tell from searching around is that the template doesn't support adding custom attributes.</p>
  
  <p>But how does one create a custom template adding support for the custom attributes, while keeping all the functionality of the old template?</p>