title: How to specify data attributes in razor, e.g., data-externalid="23151" on @this.Html.CheckBoxFor(...)
body: <pre><code>@this.Html.CheckBoxFor(m =&gt; m.MyModel.MyBoolProperty, new { @class="myCheckBox", extraAttr="23521"})
  </code></pre>
  
  <p>With razor, I'm unable to specify values for data- attributes such as <code>data-externalid="23521"</code></p>
  
  <p>Is there a way to do this using <code>@this.Html.CheckBoxFor(...)</code>?</p>