how to insert image in html action link? asp.net mvc

r.r picture r.r · Sep 2, 2010 · Viewed 24.5k times · Source

I have navigation and many link on my webproject from html action links. They are ugly with underline. I would like to insert some image with name or play with styles of action link. Is it possible? How to do that?

Thanks and take care, Ragims

Answer

lmondria picture lmondria · Sep 2, 2010

You could use css to remove the underlines or place a backgroundimage, otherwise you could also just create the link like so:

<a href="<%: Url.Action("Action", "Controller")%>"><img src="yourimg.jpg" /></a>