You can pass the parameters as htmlAttributes.
To do this, use the @Html.ActionLink("texto ancora", "Action", "Controller", new { htmlAtributtes })
Example:
@Html.ActionLink("Perguntas", "Index", "PerguntasRespondidas", new { @class="ui-btn ui-mini", data_rel="close", data_transition="flip", data_role="button" })
Comments:
The word class
is a reserved word. So when passing a css class like htmlAttribute use the @class="sua-classe"
syntax the MVC will know how to render it in the View.
htmlAttributes is a object
for the compiler, so the name of your property can not count some characters. such as the hyphen. Therefore the data-
attributes of the html should be written as data_
. Again, MVC does its part and renders as data-
Soon the above example would be rendered as:
<a class="ui-btn ui-mini" data-rel="close" data-role="button" data-transition="flip" href="/PerguntasRespondidas/Index/">Perguntas</a>
Example: link