Jaya Jha
2 min readJun 12, 2020

--

Using Ajax call to controller action method in Sitecore 9.1.1

I was working on a requirement where most of the task needs to be accomplished by ajax call to controller action method .As it is sitecore solution so no direct call to controller action was working for me .

what next then ?

Answer is sitecore pipeline .

Let’s see how by using pipeline my controller action call using ajax started working .

Step 1 : Add a pipeline config file to a specific feature project as follows :

Pipeline config

Step 2 : Add a route config class as follows and map the controller action method accordingly :

Route Config Class

Step 3: Register the route config class:

Register route

Step 4 : Ajax call to controller action method :

Ajax call to controller action method

in sitecore project direct ajax call to controller action is not working so its always better to use pipeline and register the routes .

Happy Learning..

--

--

Jaya Jha

I am a full-stack Web Application Developer with extensive experience in Sitecore Ecosystem .Passionate about exploring cutting edge technologies.