3

I'm trying to organize the Controllers into sub-folders so that the request would look like:

<domain>/Account/Home
<domain>/Client/Home
<domain>/Vendor/Home

And have the controllers folder like:

Controllers\Account\HomeController
Controllers\Vendor\HomeController
Controllers\Client\HomeController

I am familiar with the Areas in MVC but I prefer not to use that. If there's an alternative way to register routes to use sub-folders on the controllers, please let me know.

abatishchev
  • 98,240
  • 88
  • 296
  • 433
Ganesh
  • 245
  • 1
  • 9

1 Answers1

1

Why not use Areas? This is one of the reasons why they exist. The alternative would be to add a ton of routes to the RouteCollection (RouteCollection.MapRoute).

http://haacked.com/archive/2008/11/04/areas-in-aspnetmvc.aspx

Mark Meisel
  • 851
  • 2
  • 12
  • 24