Posts

Showing posts from September, 2020

Action method in MVC

Image
                                Action Method in MVC          1)  When we create a controller in MVC it creates Default method Index which is called as                 Action method             2)  When you create a method in controller every method is public. means every action method                is public           3)  When we create an Action method we can not create a method as static.             4)  When we hit URL from the browser then it performs the MVC life cycle and finds a                controller and action method in return response to the user.           Let Understand How to create Action method in Controller                            The first   step to creating a project  in MVC   . after creating a project  right click on the controller        Add Controller and inside a controller, we can add multiple action method.               please choose controller and give controller name so when we create controller it creates     default method which is index method