Reputation: 4459
I'm wondering whether it's possible to have several nested controllers within one main one in MVC 3? For example:
public class AdminController : Controller
{
public class PagesController : Controller
{
}
//More controllers
}
I've tried this but couldn't get it to work, have modified my routes in global.asx but still nothing. How can I call the correct controller from AdminController
when the url is for example:
/Admin/Pages/Index
Upvotes: 0
Views: 659
Reputation: 191058
No this is not allowed. The controller factory won't be able to resolve it.
Upvotes: 0