title: How to use dashes in HTML-5 data-* attributes in ASP.NET MVC
body: <p>I am trying to use <a href="http://ejohn.org/blog/html-5-data-attributes/" rel="noreferrer">HTML5 data- attributes</a> in my ASP.NET MVC 1 project. (I am a C# and ASP.NET MVC newbie.)</p>
  
  <pre><code> &lt;%= Html.ActionLink("« Previous", "Search",
       new { keyword = Model.Keyword, page = Model.currPage - 1},
       new { @class = "prev", data-details = "Some Details"   })%&gt;
  </code></pre>
  
  <p>The "data-details" in the above htmlAttributes give the following error:</p>
  
  <pre><code> CS0746: Invalid anonymous type member declarator. Anonymous type members 
    must be declared with a member assignment, simple name or member access.
  </code></pre>
  
  <p>It works when I use data_details, but I guess it need to be starting with "data-" as per the spec.</p>
  
  <p>My questions:</p>
  
  <ul>
  <li>Is there any way to get this working and use HTML5 data attributes with Html.ActionLink or similar Html helpers ?</li>
  <li>Is there any other alternative mechanism to attach custom data to an element? This data is to be processed later by JS.</li>
  </ul>