ASP.NET Vnext Tag Helpers for Areas

2019-04-17 01:08发布

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.?

2条回答
Ridiculous、
2楼-- · 2019-04-17 01:48

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

查看更多
Anthone
3楼-- · 2019-04-17 01:51

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

查看更多
登录 后发表回答