<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function () { $("#SayHello").click(function (e) { e.preventDefault(); $.ajax({ type: 'GET', data: '{"name": "' + $("input#name").val() + '"}', url: 'http://localhost:2312/Webservices%20Practice/Service.asmx?op=Hello', contentType: 'application/json; charset=utf-8', dataType: 'json', success: function (data, textStatus, XMLHttpRequest) { alert(data.d); }, error: function (XMLHttpRequest, textStatus, errorThrown) { alert(textStatus); } }); }); }); </script>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)