ASP.NET MVC - Application Folders
To learn ASP.NET MVC, we will build an Internet application.
Part 2: Explore the application folders.
The MVC folder
The folder contents of a typical ASP.NET MVC web application are shown below:
|
![]() |
Application information Properties
Application folders The App_Data folderThe Content folder The Controllers folder The Models folder The Scripts folder The Views folder Configuration file Global.asax
|
Application information
Properties
References
Application folders
App_Data folder Content folder Controllers folder Models folder Scripts folder Views folderConfiguration file
Global.asax
packages.config
Web.config
Application information
Properties
References
Application folders
App_Data folder Content folder Controllers folder Models folder Scripts folder Views folderConfiguration file
Global.asax
packages.config
Web.config
All MVC applications have the same folder names. The MVC framework is based on default naming. Controllers are written in the Controllers folder, views in the Views folder, and models in the Models folder. You do not need to use the folder names in your application code.
Standardized naming reduces the amount of code and helps developers understand the MVC project.
The following is a brief overview of the contents of each folder:
The App_Data folder
App_Data The folder is used to store application data.
We will cover adding an SQL database to the App_Data folder in a later chapter of this tutorial.
The Content folder
Content The folder is used to store static files, such as style sheets (CSS files), icons, and images.
Visual Web Developer automatically adds a themes folder to the Content folder. The themes folder stores jQuery styles and images. In the project, you can delete this themes folder.
Visual Web Developer also adds a standard style sheet file to the project: the Site.css file in the content folder. This style sheet file is the one you need to edit when you want to change the application's style.

We will edit this style sheet file (Site.css) in the next chapter of this tutorial.
The Controllers folder
The Controllers folder contains the controller classes responsible for handling user input and responses.
MVC requires that the name of all controller files end with "Controller".
Visual Web Developer has already created a Home controller (for the Home page and About page) and an Account controller (for the Login page):

We will create more controllers in later chapters of this tutorial.
The Models folder
The Models folder contains the classes that represent the application model. The model controls and manipulates the application's data.
We will create models (classes) in later chapters of this tutorial.
The Views folder
The Views folder is used to store the HTML files (user interface) related to the display of the application.
The Views folder contains one folder for each controller.
In the Views folder, Visual Web Developer has created an Account folder, a Home folder, and a Shared folder.
The Account folder contains pages for user account registration and login.
The Home folder is used to store application pages such as the home page and about page.
The Shared folder is used to store views shared between controllers (master pages and layout pages).

We will edit these layout files in the next chapter of this tutorial.
The Scripts folder
The Scripts folder stores the application's JavaScript files.
By default, Visual Web Developer places the standard MVC, Ajax, and jQuery files in this folder:

**Note:** The file named "modernizr" is a JavaScript file used to support HTML5 and CSS3 in the application.
