In this article we will see how to handle the action which is not there in application.
Consider a scenario where we call an action method using an action name that is not available in the controller. We call the correct controller but the action name that we pass is not in the controller. So in this situation we need to handle the exception. For that there is a method called "HandleUnknownAction". HandleUnknownAction is a virtual method available inside the controller abstract class. It is called when a request matches the controller but no method with the specified action name is found in the controller.Let's see the step-by-step implementation:
<<File Download Sample in MVC: Day 40
ASP.NET MVC 5: A Beginner’s Guide