我如何在剃须刀页面中进行设置,使用标签助手在href上调用什么路由?
我的控制器,名为TestController:
[Route("A/B/C",Name = "Route_1")]
[Route("A/B/C/{id?}",Name = "Route_2")]
[Route("A/B/C/D/{id?}",Name = "Route_3")]
public IActionResult TestAction(string id = null)
{
...
}
视图:
<a class="btn btn-primary float-right"
style="margin-bottom:4px;"
asp-controller="TestController"
asp-action="TestAction"
asp-route-id="@Model.Id">
Click button
</a>
答案 0 :(得分:2)
使用{{ str_limit(rtrim($users->tags,','),'36',("")) }}
命名路由:
asp-route