What are Non Action methods in MVC?

Technology CommunityCategory: ASP.NET MVCWhat are Non Action methods in MVC?
VietMX Staff asked 3 years ago

In MVC all public methods have been treated as Actions. So if you are creating a method and if you do not want to use it as an action method then the method has to be decorated with “NonAction” attribute as shown below:

[NonAction]
public void TestMethod()
{
   // Method logic
}