InterviewSolution
Saved Bookmarks
| 1. |
What Are Non Action Methods In Mvc? |
|
Answer» 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 } 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 } |
|