I have an ASP.NET MVC 5 project and I want to handle some complex routes.
Lets say I want to display products of category 5 and 6 that have features 1 and 2 and tags 3-4-5.
The url for this request should be:
categories/5_6/category5_category6/features/1_2/feature1_feature2/tags/3_4_5/tag3_tag4_tag5/
The important info for this url are the numbers, so even if we misspell some feature description the mvc controller checks only the features ids.
Ideally my controller should receive just the ids.
public ActionResult Find(int[] categories = null, int[] features = null, int[] tags = null)
{
return View();
}
Is it possible to register routes for this format so it can handle different combinations like
categories/5_6/category5_category6/features/1_2/feature1_feature2 categories/5_6/category5_category6/tags/3_4_5/tag3_tag4_tag5/
...
Thank you