更新时间:2023-12-05 22:14:52
您可以使用属性前缀asp-route-为路由变量名称添加前缀.
asp-route-
You can use the attribute prefix asp-route- to prefix your route variable names.
示例:
<a asp-controller="Product" asp-action="GetProduct" asp-route-id="10"> ProductName</a>
如何在ASP.NET Core MVC中将链接参数添加到ASP标记助手