ASP.NET Vnext Tag Helpers for Areas

北城以北 提交于 2020-01-02 00:32:40

问题


I may use <a href='/Area/Controller/action'> </a> in asp.net vnext but just want to know whether we can use tag helpers like <a asp-controller="ControllerName" asp-action="ActionName" asp-area="AreaName"> to redirect to the specific file in the area.

Will any one guide me how to redirect to a file in area using tag helpers.?


回答1:


Finally I got the answer from the following link which works well.

<a asp-route-area="AreaName" asp-controller="ControllerName" asp-action="ActionName"> </a>

github link




回答2:


If you use ReSharper it's IntelliSense could also override the Tag Helpers. I described my solution in this post.



来源:https://stackoverflow.com/questions/30625817/asp-net-vnext-tag-helpers-for-areas

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!