$(function () {
$("#loginbtn").click(function () {
var obj = {};
alert("hii");
obj.name = $.trim($("#username1").val());
obj.age = $.trim($("#password1").val());
$.ajax({
type: "POST",
url: "Incomeexpenses.aspx/SendParameters",
data: JSON.stringify(obj),
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (r) {
alert(r.d);
}
});
return false;
});
});
in cs file i have this method
[WebMethod]
public static void SendParameters(string uname, string password)
{
}
}
it show like error
?

Suraj KumarRank #353 · 7.1K reputationPosted Oct 15, 2018, 9:35 PM EDT
Harish BatchuRank #6,801 · 256 reputationPosted Oct 15, 2018, 10:30 PM EDT
Suraj KumarRank #353 · 7.1K reputationPosted Oct 15, 2018, 10:35 PM EDT
Sreekanth ReddyRank #726 · 3.2K reputationPosted Oct 16, 2018, 12:28 AM EDT