Answers for "excute same code mvc"

C#
0

excute same code mvc

Build a base controller

public class BaseController : Controller
{
    protected override void OnActionExecuting(ActionExecutingContext context)
    {
        base.OnActionExecuting(context);
        // your code here
    }
}

public class HomeController : BaseController // instead of Controller
{
    // ...
}
Posted by: Guest on November-09-2020

C# Answers by Framework

Browse Popular Code Answers by Language