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.
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.
Hello,
I have a same problem but my route have an extra paramater after category.
/2009/World/Asia/08/12/bla-bla-bla
and asp.net mvc does not support this because my routing should be
{year}/{*category}/{month}/{day}/{name}
i tried use constraint like
year = @"(\d{4})",category = @"((.+)/)+", month = @"(\d{2})", day = @"(\d{2})"
but i cannot find any solution.
Is there any comment?
Thank you