There may be other options but from the top of my head I can only think of one "simple" solution as the local block isn't an entity in it self but a part of the page - add the action to the page's controller.
If the block can also be used a shared block, meaning you want the action in the block's controller you could implement the action in the page's controller to just delegate to the block controller's action.
Thanks, as I am using a block controller and my own view model to extend block properties I have passed page content guid to view and used an html 5 data tag for ajax request back to action and load the page info again, this works but probably not the best solution
var pageRouteHelper = ServiceLocator.Current.GetInstance<PageRouteHelper>();
if (pageRouteHelper.Page != null)
PageContentGuid = pageRouteHelper.Page.ContentGuid;
Same problem here, I want to filter a block with ajax, any suggestions other than adding an action to the page controller?
Set up Web API and use that instead for AJAX requests?
Does anyone know best way to do an AJAX Post /Get with in a local page block?
E.g. I have a local block on home page, which has its own controller /view etc., but I want to call a separate action result using jQuery Ajax but want the current page and current block content available. I can get to controller by registering a custom route in global but do not have the current page / block content available.