views:

31

answers:

2

I have an exising asp.net MVC app, and I want to add 'Areas' now.

What are the ramifications of this? Any gotchas?

A: 
  • Check your routes registration in Global.asax
  • Check that you don't have hard coded link (without Html.Action or Ajax.Action) pointing to the controllers or action that you have moved to a new area
Gregoire
A: 

If you add Areas then all of your routing will be different. Be sure to test all of your routes. Things might get especially hairy if you are going from one area to another - you will need to specify the area the routevalues (new {area = "myArea"}).

Loki Stormbringer
also, for the default route, make sure you specify a default area.
dave thieben
"add Areas then all of your routing will be different" - This isn't true, existing routes can stay the same way they are now.
jfar
Also... If you want to get back to the 'root' area, set the area to `""`.
Dan Atkinson