Reputation: 1278
In my app, I am calling .Net soap based webservices. My web service call function is :
function CallService5() {
$.ajax({
type: "POST",
url: "http://10.0.2.2:51434/Service1.asmx/GetAllTableStatus",
dataType: "json",
data: "{}",
contentType: "application/json; charset=utf-8",
success: OnSuccess,
error: OnError
});
}
How can i add more than one parameter..?
Upvotes: 2
Views: 317
Reputation: 19618
I think you can use like this
var firstName = document.getElementById("txtFirstName").value;
var lastName = document.getElementById("txtLastName").value;
data : "{'firstName':firstName,'lastName':lastName}"
Upvotes: 1
Reputation: 58
You read the following articles: it gives good solutions..
http://elegantcode.com/2009/02/21/javascript-arrays-via-jquery-ajax-to-an-aspnet-webmethod/
http://encosia.com/2008/03/27/using-jquery-to-consume-aspnet-json-web-services/
Upvotes: 0
Reputation: 5614
You can add parameters as query string in the url part of service
"http://10.0.2.2:51434/Service1.asmx/GetAllTableStatus?para =val"
Upvotes: 0