-5

Possible Duplicate:
Call ASP.NET web service method from JavaScript

Calling C# web service method from java script i.e webserivces method to be called through java script or XML DOM

0

1 Answer 1

1

Inside document.ready:

 $.ajax({
        type: "POST",
        url: "Service.svc/WebServiceMethodName",
        data: JSON2.stringify({ UrParameter: UrparameterValue}),//Parameter to pass
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        success: function() {
         //Do Some Stuff here

        }

    })

Dont forget to include js and json2.js.Its a sample code.U can modify it as your requirement.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.