Define Controller in MVC?

Category: C SharpDefine Controller in MVC?
Editor">Editor Staff asked 2 years ago

Define Controller in MVC?

1 Answers
Editor">Editor Staff answered 2 years ago

The controller provides model data to the view, and interprets user actions such as button clicks. The controller depends on the view and the model. In some cases, the controller and the view are the same object.
 
Most Asked ASP.NET MVC Interview Questions and Answers
 
The Controllers Folder
 
The Controllers Folder contains the controller classes responsible for handling user input and responses. MVC requires the name of all controllers to end with “Controller”.
 
In our example, Visual Web Developer has created the following files: HomeController.cs (for the Home and About pages) and AccountController.cs (For the Log On pages):
 
Most Asked ASP.NET MVC Interview Questions and Answers