ASP.NET MVC: Routing Hierarchy URL

How can I do routing for this?

URL: / category / main / sub / or / category / main / sub1 / subsub /

I want to have / main / sub / and / main / sub1 / subsub / as parameters in the action method of the CategoryController index.

+4
asp.net-mvc asp.net-routing
source share
1 answer

Found answer:

Must use "/ category / {* path}" instead of "/ category / {path}" in the routing path.

+2
source share

All Articles