ASP.NET MVC Routing Question

前端 未结 6 2056
悲哀的现实
悲哀的现实 2021-02-02 17:08

I must be dense. After asking several questions on StackOverflow, I am still at a loss when it comes to grasping the new routing engine provided with ASP.NET MVC. I think I\'v

6条回答
  •  醉话见心
    2021-02-02 18:03

    The important thing to understand is that the routes are matched in the order they are registered. So you would need to register the most specific route first, and the most general last, or all requests matching the general route would never reach the more specific route.

    For your problem i would register routing rules for each of the special pages, like "register" and "login" before the username rule.

提交回复
热议问题