views:

63

answers:

2

Hello all,

<%= Html.RouteLink(">>>", new { page = (Model.PageIndex + 1) },null)%>

Is it possible to set image instead ">>>" and how?

Take care, Ragims

A: 
<a href="<%= Url.RouteUrl(new { page = (Model.PageIndex + 1) })">
    <img src="next.jpg" />
</a>

I'm unsure of the exact syntax, don't have ASP.NET MVC on the current machine.

Yuriy Faktorovich
it is first what i did. doesnt work at all
Ragims
est li voobsche vosmoshnost?
Ragims
@Ragims what happens when you use the first way?
Yuriy Faktorovich
`Html.RouteLink` encodes the display text.
Craig Stuntz
@Craig: Thank you, I've removed that option.
Yuriy Faktorovich
Doesn't `RouteLink()` return an anchor tag?
hunter
@Yuriy meant to write `Url.RouteUrl`. There is no `Url.RouteLink`
Craig Stuntz
A: 

Possible duplicate.

http://stackoverflow.com/questions/712593/mvc-routelink-and-image

Please check out the Link in that question and view the provided examples for the custom ImageLink Helper.

JeremySpouken