$.ajax({
type: "POST",
url: "Default4.aspx/SaveUser",
data: "{ 'taskid': '" + taskid + "'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (data) {
var flag = data;
if (flag == "fail") {
alert("task in use");
}
else {
alert("task not in use");
}
}
});
I have function in called SaveUser
like this:
public static void SaveUser()
{
//something to do;
}
In Default4.aspx.cs
when I call this it's not executing. I tried its calling javascript because I gave alert there but it's not entering AJAX. Can any one help?