2010-10-07 95 views

回答

8

可以使用UrlHelper类:

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

的MSDN链接是在这里:http://msdn.microsoft.com/en-us/library/system.web.mvc.urlhelper.aspx

+0

O,这是很明显的,我认为:)谢谢! – 2010-10-07 08:20:18

+0

BTW,我发现一些有用的信息在这里:http://stephenwalther.com/blog/archive/2009/03/03/chapter-6-understanding-html-helpers.aspx这里http://iridescence.no /post/Rendering-Action-Links-in-ASPNET-MVC-Applications.aspx – 2010-10-07 22:42:22