2010-10-07 11 views

Respuesta

8

Puede utilizar la clase UrlHelper:

<a href="<% =Url.Action("Create","Customers") %>"> 
    <span class="icon"/> New customer 
</a> 

El enlace de MSDN está aquí: http://msdn.microsoft.com/en-us/library/system.web.mvc.urlhelper.aspx

+0

O, es mucho más obvio, que pensé :) Gracias! –

+0

Por cierto, he encontrado información útil aquí: http://stephenwalther.com/blog/archive/2009/03/03/chapter-6-understanding-html-helpers.aspx y aquí http://iridescence.no /post/Rendering-Action-Links-in-ASPNET-MVC-Applications.aspx –

Cuestiones relacionadas