So it seems that the non-generic overload of Html.ActionLink()
works nicely with HTML5 data-
attributes by renaming attributes with underscores into attributes with hyphens:
How to use dashes in HTML-5 data-* attributes in ASP.NET MVC
But, this doesn't seem to work for the strongly-typed Html.ActionLink<TController>()
.
So, the link for JQuery Mobile
@(Html.ActionLink<HomeController>(
c => c.Index(),
"Home",
new { data_direction="reverse" } ))
gives an HTML source of
<a data_direction="reverse" href="/" class="ui-link">Home</a>
which is not what I want.
Any ideas? There's no overload that takes a RouteValueDictionary
so that route is out.