I have implemented in my app the mitigation to CSRF attacks following the informations that I have read on some blog post around the internet. In particular these post have
You can do this also:
$("a.markAsDone").click(function (event) {
event.preventDefault();
$.ajax({
type: "post",
dataType: "html",
url: $(this).attr("rel"),
data: $('').serialize(),
success: function (response) {
// ....
}
});
});
This is using Razor
, but if you're using WebForms
syntax you can just as well use <%= %>
tags