C#C
C#3y ago
Pokey

Mapping controller to / without breaking other controllers

Hi there,

I would like to rename HomeController to DefaultController and instead of going to /Default/Action I would like to go to /Action

This should be simple, but I do not want to break routing for other controllers. The order of importance I wish to follow is controller name and then DefaultController action name (If there is a DefaultController.Dashboard action and a DashboardController.Index action I would like DashboardController.Index to take priority)

How might I best configure one or more MapControllerRoute entries to permit this?

Thanks!
Was this page helpful?