Here we will explain to what is Controller in mvc asp.net .how to use Controller in mvc asp.net or how to create a Controller in mvc asp.net or what is responsibility of a Controller in mvc or controlling the flow of the application execution with example.
Asp.net 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.
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.
A Controller class file will be created like this: