1.

What Are Non Action Methods In Asp.net Mvc?

Answer»

In ASP.Net 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

}

In ASP.Net 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

}



Discussion

No Comment Found