I need to know how to add a image in @Html.ActionLink
The code I have is:
@Html.ActionLink("IMAGE","Index","Home");
How to replace the IMAGE with an URL where my image is residing.
I need to know how to add a image in @Html.ActionLink
The code I have is:
@Html.ActionLink("IMAGE","Index","Home");
How to replace the IMAGE with an URL where my image is residing.
Use @Url.Action instead:
<a href='@Url.Action("Index", "Home")'>
<img src="IMAGE PATH HERE" />
</a>
Use this
<a href="<%: Url.Action("Action", "Controller")%>"><img src="yourimg.jpg" /></a>
@ nugget.