How to: Add an Action Method to an MVC Controller in Visual Studio
A controller includes action methods that it can call in response to user interactions, such as clicking a link or submitting a form. Most action methods return an ActionResult object. You do not have to instantiate an ActionResult object. That is performed for you by the action helper.
An action method must call one of the following action helpers as its return value:
To add an action method to an MVC controller
In Visual Studio, open the controller class that you want to add the action method to.
Add code similar to the following, which defines an action method that renders a view named MyAction.
Enter the logic for the action method.
Save and close the file.