Hi, I want to send three text box values to server using jquery ajax. problem is that, i dont know the exact syntax to send three data. When i try sending one data(also change no.of parameters to one at server side method), its going good but when i try to send three text box values, its giving jquery error:"Internal server error". I think I am not sending data in correct way. please somebody tell me how to do that.
Below is the code:
function testCAll() {
$.ajax({
type: "POST",
url: "dbTest1.aspx/SendMessage",
data: "{'name': '" + $('#Eid').val() + "', 'phone': '" + $('#phn').val() + "'}",
//data: "{'phone': '" + $('#CustomerPhone').val() + "'}",
//data: "{'color': '" + $('#ColorId').val() + "'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(result) {
resultData = eval("(" + result.d + ")");
$("#rawResponse").html(concatObject(resultData));
},
error: function(result) {
alert("jQuery Error:" + result.statusText);
}
});
}