I have problem with below details from MVC project.
When I am trying to use jquery ajax request with loading panel like spinning gif (or even text), I am getting err
Rather than manually adding it to each request, I usually do something like this:
var token = $('input[name="__RequestVerificationToken"]').val();
$.ajaxPrefilter(function (options, originalOptions) {
if (options.type.toUpperCase() == "POST") {
options.data = $.param($.extend(originalOptions.data, { __RequestVerificationToken: token }));
}
});
This will automatically add your token to any ajax POST you do.