1. After compiling the foreground page of MVC, a foreground page class will also be generated. Add this code to the page the day before yesterday . GetType (). Assembly.getlocation () Gets the assembly where the current class is located, and can see the program it is in, and it will find out if the type view inherits the Webviewpage<object> The strong type is the strong type object of locomotive webviewpage<. This is why the model, can be the occasion. The reason for the corresponding attribute
2, When you start the MVC page, you will first find the _viewstart.cshtml under View and output its page code, under control to find out if there is _viewstart.cshtml , if there is the same output, the code in the current page is output. If the current page is Layout=null, the _viewstart.cshtml The layout code referenced in the. Layout is called the _layout.cshtml code under the Shred folder. _Layout.cshtml Such files can be more than one, implementing different global layout pages.
3, when the compilation starts MVC, first compiles the Global.asax, registers in the first pipeline event, registers the route in the seventh time, that is, matches the routing rule in that place. In the eighth event, the Remaphander property in the context of the monitoring is empty, and the next event is not empty. Invokes the corresponding action method in the controller between 11 and 12 events and executes
The little knowledge of MVC.