I am using ActionLink with id in MVC 4 app and assinging actionLink id an image in css but on on earth I am doing wrong. is not working! here is my code
<
You only needed to change:
new { id = "_logo"}
to:
new { @id = "_logo"}
Without the @
in front of id
it treats it as a parameter instead of a attribute of the html element.
Without the @
, it would produce:
www.site.com/home/index/_logo
With the @
, it would produce:
www.site.com/home
and the element would be: