【发布时间】:2020-04-03 19:26:04
【问题描述】:
这是一个非常简单的问题,但我的搜索没有得到预期的答案。我有一个网址:
http://localhost/customers
显然这会映射到“客户”文件夹中的 Index.cshtml 文件。
我想要另一个网址:
http://localhost/customers/<CustomerID>
映射到另一个页面/Customers/Detail.cshtml
如何在 .NET Core 3.0 中配置路由,以便对 http://localhost/customers/<CustomerID> 的请求路由到 Detail.cshtml?
【问题讨论】:
标签: asp.net-core routing razor-pages