Does anyone know how to provide routing maps for multiple controllers in the same area with multiple parameter names?
I have a request to provide URL without the parameter names (only values) for each controller with unique parameter names (to avoid ambiguity)
Is this possible?
I would like to get this output in URL:
/myAreaName1/mycontrollerName1/Edit/12/23
/myAreaName1/mycontrollerName2/Edit/someValue1/23
using something like this:
context.MapRoute(
"mapRouteName1",
"myAreaName1/{controller}/{action}/{customID}/{sustomID2}",
new { controller = "mycontrollerName1", action = "Index", customID= UrlParameter.Optional, sustomID2= UrlParameter.Optional },
new string[] { "Project.Areas.SomeArea.Controllers" }
);
context.MapRoute(
"mapRouteName1",
"myAreaName1/{controller}/{action}/{customValue}/{sustomID3}",
new { controller = "mycontrollerName2", action = "Index", customValue= UrlParameter.Optional, sustomID3= UrlParameter.Optional },
new string[] { "Project.Areas.SomeArea.Controllers" }
);