ASP.NET MVC: Routing hierarchy URL
Asked Answered
H

1

4

How can I make 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 Index action method of CategoryController.

Hackman answered 19/10, 2009 at 11:31 Comment(0)
H
2

Found the answer:

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

Hackman answered 19/10, 2009 at 11:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.