In an ASP.NET MVC application with views that make AJAX calls for widgets like dropdowns and data grids, is it better to use Web API controllers or regular MVC action methods that return JSON?
The controllers that return views inherit from a base controller that overrides OnActionExecuting
to provide data for the UI. Hence, for handling AJAX requests, new controllers need to be created.
Should I stick to using MVC controllers or is there a benefit to using WebAPI instead to handle AJAX requests made by the razor views?