开发者

ASP.NET MVC: Routing hierarchy URL

开发者 https://www.devze.com 2022-12-08 17:05 出处:网络
How开发者_开发技巧 can I make routing for this? URL: /category/main/sub/ or /category/main/sub1/subsub/

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.


Found the answer:

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

0

精彩评论

暂无评论...
验证码 换一张
取 消