First of all, I need to say that I'm using T4MVC
. I have such Action
:
public virtual ActionResult List(string slug, string category, String selectedFilters)
And route for this Action
:
routes.MapRoute("ProductsList", "{slug}/{category}/{selectedFilters}", MVC.Product.List()
.AddRouteValue("selectedFilters", string.Empty), constraints: new { slug = new ProductListConstraint() });
In my project are exist links with such scheme: /{slug}/{category}
My route doesn't react on such link.
But this route (without constraint) works just fine:
//routes.MapRoute("ProductsList", "{slug}/{category}/{selectedFilters}", MVC.Product.List()
// .AddRouteValue("selectedFilters", string.Empty));
Could anyone explain me why and could help to fix it?