0% found this document useful (0 votes)
3 views

MVC Model View Controller Summary

Uploaded by

Abadullah Hamidi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

MVC Model View Controller Summary

Uploaded by

Abadullah Hamidi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

1.

Model

- Role:

- Handles application data and business logic.

- Transfers data between the Controller and View.

- Key Points:

- Interacts with the database to manage application data.

- Encapsulates data in public properties.

- Stored in the Model folder in MVC.

2. View

- Role:

- Provides the user interface for displaying data and interacting with the application.

- Types:

1. ASPX View Engine: Uses .ASPX files.

2. Razor View Engine: Uses .CSHTML files, simpler and HTML-friendly.

- Key Points:

- Stored in the Views folder, organized by Controller name.

- Example: Views for HomeController are in Views > Home.

- Allows mixing HTML with server-side code (C#, VB.NET).

3. Controller

- Role:

- Connects user input, Model, and View.

- Handles browser requests and sends responses.

- Key Points:

- Stored in the Controller folder.


- Controller class:

- Ends with "Controller" (e.g., HomeController).

- Contains public methods called Action Methods.

- Transfers data to Views using ViewData, ViewBag, and TempData.

You might also like