I currently have an action defined in my controller:
// GET: /schools/:cleanUrlName/data-loggers
public ActionResult DataLoggers(string cleanUrlName)
{
return View();
}
This works when I hit "/schools/brisbane-state-high-school/dataloggers", however - as per the comment - I want to access it via a slightly cleaner url (using hyphens): "/schools/brisbane-state-high-school/data-loggers". I know I could write a route to accomplish this, but I was hoping I wouldn't have to write a new route for every multi-worded action/controller. Is there a better way to address this?
Route
and remove the hyphens for the action name with overriding theGetRouteData
method... – Veradis