$.fn.executeCommand = function(command, action) { $(this).each(function() { $(this).click(function() { action = action || $(this).data("action") || $(this).attr('href'); var form = $("<form method='post' action='" + action + "'><input type='hidden' name='CommandName' value='" + command + "'></form>").appendTo($("body")); $('<input />').attr('type', 'hidden') .attr('name', "__RequestVerificationToken") .attr('value', $('#__AjaxAntiForgeryForm input[name=__RequestVerificationToken]').val()) .appendTo(form); form.submit(); return false; }); }); };
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)