First Lecture
First Lecture
Outlines
The controller is the heart of MVC and it handles the user request.
It is a simple class.
The controller can access the model and pass data to view with the
help of a model.
We can pass the data between the controller and view using
View Data, Temp Data, and View Bag.
The controller is intermediate between model and view
Model ,View, Controller
Basic Workflow Of MVC
Advantages of MVC
App_Data folder can contain application data files like LocalDB, .mdf files,
xml files and other data related files.
IIS will never serve files from App_Data folder.
App-Start-ASP.NET MVC Folder Structure
Content folder contains static files like CSS files, images and icon files.
MVC 5 application includes bootstrap.css, bootstrap.min.css and
Site.css by default.
Controller -ASP.NET MVC Folder Structure
Controllers folder contains class files for the controllers.
Controllers handles users' request and returns a response.
MVC requires the name of all controller files to end with "Controller".
Fonts -ASP.NET MVC Folder Structure
Fonts folder contains custom font files for your application.
Model -ASP.NET MVC Folder Structure
Models folder contains model class files.
Typically model class includes public properties, which will be used by
application to hold and manipulate application data.
Scripts -ASP.NET MVC Folder Structure
Scripts folder contains JavaScript or VBScript files for the application.
MVC 5 includes javascript files for bootstrap, jquery 1.10 and modernizer
by default.
THE END