HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
In order to learn ASP.NET MVC, we will build an Internet application.
Part 5: Adding a view for display applications.
Views folder store is displayed with the application (user interface) related files (HTML files). Depending on the language used in the content of these documents may be extensions may be html, asp, aspx, cshtml and vbhtml.
Views folder contains a file folder corresponding to each controller.
In the Views folder, Visual Web Developer has created an Account folder, a Home folder, a Shared Folder.
Account folder contains pages for user account registration and login.
Home folder is used to store application pages such as home pages and pages about the class.
Shared folders for sharing views between the memory controller (master pages and layout pages).
In the Views folder, you can see the following HTML file types:
文件类型 | 扩展名 |
---|---|
纯 HTML | .htm or |
经典 ASP | |
经典 ASP.NET | x |
ASP.NET Razor C# | .cshtml |
ASP.NET Razor VB | .vbhtml |
Index.cshtml file represents the application of the Home page. It is the default file (page file) of the application.
Writes the following in the file:
About page document represents About.cshtml application.
Writes the following in the file:
Select Debug, the Visual Web Developer menu, start Debug Start Debugging (or press F5).
Your application will display the following:
Click on "Home" tab and the "About" tab to see how it works.
congratulations. You've created your first MVC application.
Note: You can not yet click "Movies" tab. We will add the code in a later section of this tutorial for the "Movies" tab.