I'm using XP 10.1 & XC 10.1
The following way used to work in earlier versions of XP.
using (Ajax.BeginForm("SaveContactUsFormData", "ContactUsForm",
new AjaxOptions
{
HttpMethod = "Post",
OnSuccess = "OnSuccessContactUs",
OnFailure = "OnFailureContactUs",
LoadingElementId = "divLoading"
}))
{
@Html.AntiForgeryToken()
<button type="submit">Submit</button>
}
But now it renders the form action url as - /api/cxa/ContactUsForm/SaveContactUsFormData
I'm expecting the url should be - /api/sitecore/ContactUsForm/SaveContactUsFormData
. Is that correct or has it changed for commerce (or xp 10.1).
The controller method is not triggered on debug and the button click is doing a postback instead of an asynchronous call.
UPDATE:
The code in the action method does execute without any errors.