如何生成内部带有自定义html的操作链接。如下所示:<a href="http://blah-blah/.....">
<span class="icon"/>
New customer
</a>
您可以使用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
对于.net的较新版本,
替换
href="<% =Url.Action("Create","Customers") %>"
与
href="@Url.Action("Create","Customers")"
给类似的东西
<a href="@Url.Action("Create","Customers")">
<span class="icon"/> New customer
</a>