标签:
Html.ActionLink generates an <a href=".."></a> tag whereas Url.Action returns only an url.
For example:
@Html.ActionLink("link text", "someaction", "somecontroller", new { id = "123" }, null)
generates:
<a href="/somecontroller/someaction/123">link text</a>
and Url.Action("someaction", "somecontroller", new { id = "123" })
generates:
/somecontroller/someaction/123HTML.ActionLink vs Url.Action in ASP.NET Razor
标签:
原文地址:http://www.cnblogs.com/billion-win/p/4468024.html