Reputation: 1912
I need to include an image within the <a>
tag of an ActionLink. What is the best way to do this?
The final rendered link should look like this,
<a href="/Home/Test"><img src="test.jpg" />Test</a>
Upvotes: 0
Views: 312
Reputation: 887215
Like this:
<a href="<%= Url.Action("...")"><img src="test.jpg" alt="test" />Test</a>
Upvotes: 2