I want to get the URL of a route using the same syntax as Html.ActionLink
, but don't know how to do that from my View.
Is there an HtmlHelper extension that works like ActionLink
but returns only the URL?
For instance, I want to write:
<img src="<%= Html.ActionUrl("Image", new { id = 42 }) %>" />