Hello!
How can I generate action link with custom html inside.
Like following:
<a href="http://blah-blah/.....">
<span class="icon"/>
New customer
</a>
views:
34answers:
1
+1
A:
You can use the UrlHelper class :
<a href="<% =Url.Action("Create","Customers") %>">
<span class="icon"/> New customer
</a>
The MSDN link is here : http://msdn.microsoft.com/en-us/library/system.web.mvc.urlhelper.aspx
mathieu
2010-10-07 07:33:59
o, it is much obvious, that I thought :) Thanks!
alexb
2010-10-07 08:20:18
BTW, I've found some helpful info here: http://stephenwalther.com/blog/archive/2009/03/03/chapter-6-understanding-html-helpers.aspx and here http://iridescence.no/post/Rendering-Action-Links-in-ASPNET-MVC-Applications.aspx
alexb
2010-10-07 22:42:22