Asp.Net MVC project management partition

  Subdivision project builds: Add -> area -> Area name

Then we found Areas generate a folder and inside view controller and Model, we add a controller and a corresponding default Home view, we see that there is again a class file Register message routing

       This time we run the program found

   There are two projects with the life of the Home controller need to specify the namespace of the corresponding controller, this time we will configure the look, add namespaces in RouteConfig in: new string [] { "Partition demo.Controllers"}

   Areas AdminAreaRegistration class file folder added namespaces: new string [] { "Partition demo.Areas.Admin.Controllers"} corresponding controller specify namespace

   Then we run again, found no conflict exists

   

Guess you like

Origin www.cnblogs.com/zjifafengfang/p/12047643.html