在Razor 视图中,我希望生成特定Razor Page的Url,该页面位于区域中。
我已经试过用这个了
@Url.Page("/Areas/Identity/Pages/Account/Manage/Orders", new { id = @Model.Id })但我得到的回报是
http://localhost:8888/Order/Submit/12345?page=%2FAreas%2FIdentity%2FPages%2FAccount%2FManage%2FOrders虽然我需要这个:
http://localhost:8888/Identity/Account/Manage/Orders?id=12345假设解决这个问题的唯一方法是应用客户路由是正确的吗?如果是的话,会有什么办法?谢谢。
发布于 2019-05-07 13:15:18
这应该能起作用:
@Url.Page("/Account/Manage/Orders", new { id = Model.Id, area = "Identity"})https://stackoverflow.com/questions/56011699
复制相似问题