Rikin Thakkar
Rikin Thakkar

Reputation: 1278

web service call with more than one parameter

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

Answers (3)

Anuraj
Anuraj

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

Deepesh
Deepesh

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

Related Questions