title: HTML Helper in JavaScript?
body: <p>In Razor I can do this:</p>
  
  <pre><code>&lt;p @Html.MyCustomDataAttributeFor(person) &gt;@person.Name&lt;/p&gt;
  </code></pre>
  
  <p>To render something like this:</p>
  
  <pre><code>&lt;p data-custom-person-id="1234567890" &gt;Fred&lt;/p&gt;
  </code></pre>
  
  <p>Must I really then do this in (unobtrusive) JavaScript:</p>
  
  <pre><code>$('p[data-custom-person-id="1234567890"]').css('background-color','red');
  </code></pre>
  
  <p>When I'd prefer to do this:</p>
  
  <pre><code>$('p[@Html.MyCustomDataAttributeFor(person)]').css('background-color','red');
  </code></pre>
  
  <p>If only I could, otherwise should the data attribute generated by the HTML helper change, my client side code will no longer style the element.</p>