So first create a MVC project in VS 2015.
My first ASP.Net MVC Program
File-> New -> Project
Select Web from templates (from left side) and ASP.Net Web Application from middle section, click on OK.
Now select MVC from template section and click on ok. Your MVC project will be created.
You may see some folders in solution explorer with name Models, Views, Controllers
To create MVC project in VS 2015, follow below steps.
For eg I have a controller with name “HomeController.cs” which is in Controllers folder cpntaining below piece of code.
Now lets start discussion on HomeController , then we will come to code section.
HomeController is the name of class and Home is the name of controller. When you want to hit controller from url just ignore the word Controller.
For eg You have a controller called “HomeController”
You may hit like this.
Now come to coding section, what is Action method.
Action method is a public method available within controller which returns response based on request.