HTML5 allows the use of custom attributes prefixed with the phrase \"data-\" which pass validation without the use of a custom DTD (more info). In Asp.Net MVC, is there any
Yes, there is an overload for ActionLink
method which takes an IDictionary
instead of an anonymous object.
<%=Html.ActionLink("text", "Index", "Home", null /*routeValues*/,
new Dictionary {
{ "data-customattribute", "value" },
{ "data-another", "another-value" }
})%>
Outputs :
text