First, what is MVV?
A Web application that the browser requests to it is a method that returns the return value of the method to the browser.
The return value can be a string, or it can be a view.
Example : Browser request
Application has a method
Public string Welcome (stringint1) {return"" " "+ Numtimes;}
Enter the following in the browser to request the method:
/helloworld/welcome?name=scott&numtimes=4
Principle: Here The browser makes the request, just like the process of invoking a function in the original console. Can have parameters passed in.
Second, how does MVC explain the browser's request?
The application's routing configuration file specifies how the browser's request is interpreted
URL: "{controller}/{action}/{id}"
Third, view file (Razor)
Typically, you will not have the controller return HTML directly,
Because this code can become very cumbersome. Instead, we typically use a separate view template file to help
Generates the returned HTML.
The Razor view template file uses the. cshtml file name extension and provides an excellent
Elegant way to use the C # language to create the HTML you want to output.
Basic knowledge of C#MVC