ASP.NET MVC Folder Structure
ASP.NET MVC Folder Structure
Hello, you will learn the folder structure of MVC . when we create a new MVC applicationit creates a default structure below:-
Let Understand Folder
1) App_Data:- This folder contains files like .mdf file , XML file , localdb etc.
2) App_Start:- This folder contains files like a bundle.config.cs, filter.config.cs ,
RouteConfig.cs . this three file in MVC 5 include by default.
this file executed when application_start called from global.asax
3) Content:- This folder contains CSS file ,image ,icon . by default bootstrap.cs,
bootstrap.min.cs, site.css are added in MVC5.
4) Controllers:- This folder contains class files and this class file inherit with a
controller class. when we add a new controller.
it appends controller name at the end . example like HomeController.cs
purpose of the controller is to handle user requests and perform requests and return response to the user.
5) Fonts:- This folder contains custom font file.
6) Models:- This folder contains the model class file. the model means data. using model object we can retrieve data and store data in the database.
7) Scripts:- This folder contains javascript file for application like bootstrap.js,
bootstrap.min.js,jquery.min.js etc.
8) Views:- This folder contains a cshtml file. model bind with view and display to users.
when we add new controller like Home and About. then when we create
the view then in view folder its crate Home folder and about folder and inside
this folder it adds respective view.
9) Global.asax:- When we run an application first global.asax application_start event fire.
there are some event in global.asax like Application_BeginRequest,
application_start, application_error,session_start , session_end etc.
10) Package.Config:- When we add a new package by NuGet so it tracks what version and
packages you have installed in the application.
11) Web. Config:- This file contains an application-level configuration.
1) App_Data:- This folder contains files like .mdf file , XML file , localdb etc.
2) App_Start:- This folder contains files like a bundle.config.cs, filter.config.cs ,
RouteConfig.cs . this three file in MVC 5 include by default.
this file executed when application_start called from global.asax
3) Content:- This folder contains CSS file ,image ,icon . by default bootstrap.cs,
bootstrap.min.cs, site.css are added in MVC5.
4) Controllers:- This folder contains class files and this class file inherit with a
controller class. when we add a new controller.
it appends controller name at the end . example like HomeController.cs
purpose of the controller is to handle user requests and perform requests and return response to the user.
5) Fonts:- This folder contains custom font file.
6) Models:- This folder contains the model class file. the model means data. using model object we can retrieve data and store data in the database.
7) Scripts:- This folder contains javascript file for application like bootstrap.js,
bootstrap.min.js,jquery.min.js etc.
8) Views:- This folder contains a cshtml file. model bind with view and display to users.
when we add new controller like Home and About. then when we create
the view then in view folder its crate Home folder and about folder and inside
this folder it adds respective view.
9) Global.asax:- When we run an application first global.asax application_start event fire.
there are some event in global.asax like Application_BeginRequest,
application_start, application_error,session_start , session_end etc.
10) Package.Config:- When we add a new package by NuGet so it tracks what version and
packages you have installed in the application.
11) Web. Config:- This file contains an application-level configuration.
Comments
Post a Comment