Friday, January 8, 2010

How to call web service using jquery

<script type="text/javascript">
function TestMethod1()
{
$.ajax(
{
type: "GET",
url: "http://localhost/DD/WebService1.asmx/HelloWorld",
data: "{}",
contentType: "application/json",
dataType: "json",
async: false,
cache: false,

success: function (result) {
alert(result.d);
},
error: function ()
{ alert(&quot;Unavailable&quot;); }
});
}
</script >

No comments:

Post a Comment

Amma Bhagavan's Songs