Client-Side Web Service Calls with javascript (AJAX)

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:

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.