ControllerNavigator is an easy to use assembly you reference in your ASP.NET MVC project that will dynamically scan your MVC application at run-time and create a navigation page (Defaults to "/Navigator" but can be changed in settings).
This makes it easy to focus on your controllers and code before you may have all of your site navigation in place.
It's an alternative to changing your default route or your web projects properties for the start URL while developing.
ControllerNavigator is not recommended for deployment on a production application, but just as a helper during development.
You will want to add a reference to the assembly and in your Global.asax, you will need to call the DisplayNavigator() method.
protected void Application_Start()
RegisterRoutes(RouteTable.Routes); //for optional settings, use the NavigationSettings class prior to calling DisplayNavigator() ControllerNavigator.Navigator.DisplayNavigator(RouteTable.Routes); }
- clean up reflection code
- add some dynamic features to pull any standard parameters (string, int, etc) from your ActionMethods and allow you to enter data in on the navigation page.
- handle cases where there may be multiple ActionMethods with the same name, but alternate signatures
- add more details about the controller. Display non-filtered ActionFilters in a column.
- weigh the pros/cons of the System.Web.Mvc reference for the custom ActionFilter.
- add unit tests
- do more testing in general
Feel free to fork/download/whatever. I'd appreciate any feedback or questions you have. If I could be handling the reflection a lot easier, drop me a line with ideas. (find me on twitter http://twitter.com/adammokan)
The included sample MVC project will show the usage with settings options in Global.asax
- .NET Framework 4.0
- ASP.NET MVC 2
- Visual Studio 2010