balexander
balexander

Reputation: 24409

ASP.NET MVC 2: Nested folder structure

I have the follow folder strucutre as default when creating a MVC project in Visual Studio:

.
├── content 
├── controllers
│   └── home
├── models 
└── views
    ├── account
    └── home
        └── index.aspx  

I want to create a similar structure but WITHIN an admin folder like so:

admin
├── content 
├── controllers
│   └── home
│       └── controller
├── models 
└── views
    ├── account
    └── home
        └── index.aspx

When I try to link to /admin/home it says it can't be find. Is this method of nesting even possible?

Upvotes: 1

Views: 1209

Answers (1)

Christina Mayers
Christina Mayers

Reputation: 516

I think what you want is an "Area", just right click your project and select add -> Area and name it admin. That will create following structure:

Areas
->admin
 ->controllers 
 ->models
 ->views 

You might also want to checkout these sites:

both should offer a good overview of the areas concept.

Upvotes: 6

Related Questions