In this tutorial we will learn to what is Controller in mvc .how to use Controller in mvc or how to create a Controller in mvc with example. 

Description: MVC Controller is a component of MVC Framework it is responsible for controlling the flow of the application execution. When user make a request to MVC applications, a controller is responsible for returning the response to that request. You can add more than one action in a controller and return different types of action results to a particular request. 


Creating controller 

For creating a Controller, create a MVC Application and then right-click on the Controller folder and select the menu option Add->Controller. After selection the Add Controller dialog is being displayed. Name the Controller as AdityaController.

What is  Controller in mvc

A Controller class file will be created like this:

What is  Controller in mvc


Leave a comment

Make sure you enter the (*) required information where indicated. HTML code is not allowed.

You may also like