Development Steps1. Set up the project2. Create a folder3, establish controllers4. Generate page5, write Html+js6, write the method of the action of the asynchronous request, return some pages (for pagination)7, JS display part of the page
8. Add New button, add action, and generate page9, add page html+js, add Save Js Method, $.post to Saveaction, save the page after successful
http://www.cnblogs.com/wlb/archive/2009/12/07/1618954.html
first exposure to MVC, only to know what is true Web development, how HTML works, how to value, how to assign value;
- No data callbacks
- View state is not saved in the page
- Developers have full control over the rendering process of the page
How unified permissions are done (permission control), data validation, development techniques (paging, batch submission, async, etc.)
MVC privilege Control: Auth Authentication data validation: foreground js,$. Post background verification, ajaxform submission; With the Wu movement of the validation control commonly used demo: Add and change: Validate code, commit code, bind code Added in bulk: [0]. Name Method Submission Check: Pagination list, partial page processing Delete: $. Post Submission Pagination list, upload method advanced knowledge:in ASP. NET mvc, files that begin with "_" are not accessible on the browser
_viewstart.cshtml defines layout, scope, current folder
_viewstart.cshtml is a startup file when rendering a view file, which executes before all view (. cshtml) is executed, mainly for some inconvenient or not in the master (_ layout.cshtml), for example, you have many masters that do not have an inheritance relationship or a single page that does not use a master.
@sectiondisplay code at specified location, mainly for JS order and, CSS order
Rendersection ("Seciton name", false) is followed by false when a child page can not be overridden, when true, the child page must be overridden
Renderbody (), child page default is body
@helper can define methods
@helper King (string str) { @str}@for (int i = 0; i < i++) { @King (i.tostring ());}
MVC correspondence, naming conventions, mapping file names
attribute:get/post
filter
html.raw
Http://www.cnblogs.com/leoo2sk/archive/2008/11/01/1324168.html
ASP. NET MVC case tutorial (based on ASP. NET MVC Beta)--Third: ASP. NET MVC global View
Tips, Quick development: debug: Reattach or Ctrl+alt+p (debug, attach) interface jump: "Find All References"
Find a file or method name: Ctrl +, (edit, position) Find: Ctrl+f,ctrl+alt+f block selection: ALT + Select code generation: ALT+SHIFT+F10, For+tab+tab, ctrl+e D Code extraction: Extraction Method
Extended information Convention is greater than configurationThe contract is better than the configuration is a simple concept. System, Class library, the framework should assume a reasonable default value, rather than requiring an unnecessary configuration. In most cases, you will find that using the default values provided by the framework will make your project run faster. 0 Configuration is not completely not configured, but by convention to reduce the configuration, reduce the XML
C # has always been said to be a strongly typed language, in layman's words, that is, the "variable" in C # is defined at the time of development.
- can enjoy the code hint function
- can get support for refactoring tools
- can find more errors at compile time
MVC vertically cuts the code in the development process, from the server to the browser layer separation, the level of coupling is very low, because it is along the underlying development context for encapsulation, so it is conducive to the developer of the entire process flow of understanding. Cannot be reused can not be installed, suitable for lightweight development, just web development is just lightweight, because the hardware, network constraints do not require too complex logic webforma large number of components because of hardware bottlenecks can not give WebForm any advantages ;The encapsulation of code is to improve the efficiency of development by sacrificing operational efficiency, and the operational efficiency of sacrifice can be solved by improving hardware performance.
MVC Advanced Tutorial + tips-Messy