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/123
출처: https://hassantariqblog.wordpress.com/2016/08/08/difference-between-html-actionlink-vs-url-action/
'ASP.net' 카테고리의 다른 글
ASP.NET MVC에서 DropDownList 도우미 사용하기 (0) | 2018.06.05 |
---|---|
[VS] Failed to complete setup of assembly (hr = 0x8007000b) (0) | 2018.05.30 |