I have a simple ajax method in my MVC.Net project which adds entries to a calendar, but when I run the following code:
sDate = new Date(jQuery(".datepicker").val());
var args = { startdate: date.toDateString(), starttime: jQuery('#ddlFrom').val(), endtime: jQuery('#ddlTo').val() };
var action = "/EventController/AddEvent/";
jQuery.post(action, args,
function (response) {
console.log(response);
if (response == "") {
jQuery('#js_divSuccess').show();
} else {
jQuery('#divError').text(response);
}
});
It first does the following (looking in firebug):
Why does it make a redirect on a post?