【发布时间】:2021-07-30 06:12:32
【问题描述】:
我正在使用 .net 核心 MVC 应用程序。如果我没有指明 asp-controller="DealController",那么操作会转到 UserController,因为调用发生在 user.cshtml 中。但是当我指定一个特定的Controller时,调用仍然没有转到DealController。请告诉我我做错了什么。
<form asp-route-empname="@deal.Id" asp-controller="DealController" asp-action="DeleteDeal" method="post">
<button type="submit">Delete</button>
</form>
【问题讨论】:
标签: c# asp.net-mvc .net-core razor-pages