Use ASP. net mvc Area-set Area to an independent project, mvcarea
Environment Description: Vistual Studio 2013
MVC 4.0
In fact, the basic knowledge about ASP. net mvc Area can refer to the soft article of http://www.cnblogs.com/willick/p/3331519.html.
The Application_Start method in Global. asax contains the following code:
AreaRegistration.RegisterAllAreas();
It is estimated that its function will dynamically inject the AreaRegistration class in the bin where the current MVC is located. This class configures the partition routing. therefore, when "partition" is independent from the current MVC Project ", find a way to save the dll compiled by this partition to the bin directory of the current MVC application.
Note: 1). The HealthDemo. Web. Admin project type is a class library, and its actual physical path is still under the HealthDemo. Web directory. For details, refer to the following
Manually change the HealthDemo. Web. Admin file of the Class Library Project HealthDemo. Web. Admin. csproj, and save the edited dll in the HealthDemo. Web \ bin directory.
Basically, the program should do things.
You can generate the corresponding url with partitions, and find that a request in the admin/controller/action form can be sent to HealthDemo. web. admin. controllers corresponds to the Controller, but the controller does not find a view that has been independent from the "outside". The actual physical path of this view file is in HealthDemo. under Home in Web \ admini\ \ Views, we need to reset the URL of the MVC search template.
Through this small experiment, I feel the settings of ASP. NET MVC 3 Area (partition) and Page Template loading search path.
Project Demo: http://yun.baidu.com/share/link? Consumer id = 1654488135 & uk = 118268666