Client-Side Web Service Calls with javascript (AJAX)

By | March 13, 2008
Today i came across a simple method of using webservices as a local function in client side code. It uses the ScriptManager control installed by ASP.NET AJAX-Enabled Web applications.
 
for example you use the followin code to the ASPX to embed the webservice :

 
   
 

 
In javascript you can now the full named webservice:
function OnLookup()
{          
  var stb = document.getElementById(“_symbolTextBox”); 
  MsdnMagazine.StockQuoteService.GetStockQuote(
    stb.value, OnLookupComplete, OnError);
}
 
A very nice feature which makes some nice possiblities.
Read more at: