Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create sub folders in the controller without Areas

I am developing a MVC 3 Web app and I want to create something like this:

/Controller
      /Blog
         BogController.cs
         ViewsController.cs
         ArticlesController.cs
      /Customers
         SalesController.cs
         ProductsController.cs          
      HomeController.cs
/Views
     /Blog
        Index.aspx
        Summary.aspx
        /Views
           Index.aspx
           Admin.aspx
           Show.aspx
       /Articles
          Show.aspx
          Admin.aspx
    /Customers
       /Sales
          Index.aspx
          Totals.aspx
       /Products
          Index.aspx
          Promotions.aspx
     /Home
       Index.aspx

Create sub folders in the controller

But in the solution that they answer to this guy was for MVC 2 and in MVC 3 the property MapAreas doesn't exits (or at least it doesn't appear to me)

So what i can do to build an structure like /Admin/Users/EditUser?id=2 for example?

If i need to create a route rule, can you write me an example of how to do it.

like image 667
juan25d Avatar asked Oct 25 '25 13:10

juan25d


1 Answers

Consider using MVC3 Areas. You can create an Admin area for that.

like image 86
Andrei Schneider Avatar answered Oct 28 '25 02:10

Andrei Schneider