I have a series of URLs that look like
/Catalog/Ajax/Update/{ViewToUpdate}?var1=a&var2=b&var3=c
Currently I've setup several routes - one for each {ViewToUpdate} and what I'd like to do is pass the {ViewToUpdate} to my Action handler so I can condense my code. Instead of:
public ActionResult AjaxUpdateNavigation(string var1, string var2, string var3) {}
I'd like:
public ActionResult AjaxUpdateNavigation(string ViewToUpdate, string var1, string var2, string var3) {}
Here are my current routes:
routes.MapRoute(
"CatalogAjaxNavigation",
"Catalog/Ajax/Update/Navigation",
new { controller = "Catalog", action = "AjaxUpdateNavigation" }
);
How do I set up the route definition correctly to handle both the {ViewToUpdate} string as well as still pass in the querystring?
TIA