I have an Asp.net application with razor view engine
I'd like to apply a css style in Html.ActionLink
. So I tried to change this :
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Espace propriétaire du terrain <span class="caret"></span></a>
To this
@Html.ActionLink("Espace propriétaire du terrain ", "About", "Home",null, new { @style="class:dropdown-toggle;data-toggle:dropdown; role:button; aria-expanded:false" })
But the style isn't applied and I get this as a source html code
<a href="/Home/About" style="class:dropdown-toggle;data-toggle:dropdown; role:button; aria-expanded:false">Espace propriétaire du terrain </a>
So I need to know :
- Why this happens?
- How can I fix my code?