Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Am using Umbraco 10.2 am trying to do Ajax Post without using BeginUmbracoForm.
I try with Ajax by JavaScript and also with HTML AjaxBeginForm my controller is inherit from SurfaceController.
In both cases I got this erorr "The required request field "ufprt" is not present."
i just wanna ask if there is possibility to use ajax post with Umbraco and if yes how archive it.
you can add [IgnoreAntiforgeryToken] to your controller action
Thanks it is working for me :)
If you want to use the antiforgery validation, you can add the following to your ajax request
beforeSend: function (xhr) { xhr.setRequestHeader("RequestVerificationToken", $('input:hidden[name="__RequestVerificationToken"]').val()); },
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
how to use Ajax POST with Umbraco 10.2
Am using Umbraco 10.2 am trying to do Ajax Post without using BeginUmbracoForm.
I try with Ajax by JavaScript and also with HTML AjaxBeginForm my controller is inherit from SurfaceController.
In both cases I got this erorr "The required request field "ufprt" is not present."
i just wanna ask if there is possibility to use ajax post with Umbraco and if yes how archive it.
you can add [IgnoreAntiforgeryToken] to your controller action
Thanks it is working for me :)
If you want to use the antiforgery validation, you can add the following to your ajax request
is working on a reply...