Switching to {controller}/{id}/{action} breaks RedirectToAction

后端 未结 6 1903
后悔当初
后悔当初 2021-01-04 23:55

I am trying to use proper REST urls with MVC. To do that I switched default Routing from:

{controller}/{action}/{id}
6条回答
  •  清酒与你
    2021-01-05 00:32

    Remove this part:

    id = UrlParameter.Optional
    

    may be resolve the problem; when you define "id" as an optional parameter, and you have the "Default" map, the "Default" and the "AdminRoute" are same together! regards.

提交回复
热议问题