Telerik RadAjax provides the ability to call web services and retrieve information via AJAX requests. For this purpose there is a special control in Telerik RadAjax controls suite called
RadAjaxServiceManager. You need to drag the control from the web form to your toolbox and fill the Services collection with paths to one or more web services. You can set relative or absolute paths to the services whereas the only limitation is that these services MUST be within your Web Application or domain
This example demonstrates how to call web services without parameters. The proxy method that Telerik RadAjax generates to call the service
has the same name as the webservice method and only takes two parameters:
ServiceCompleteCallback and
ServiceErrorCallback (as illustrated below):
function CallService()
{
QuoteService.GetQuote(ServiceCompleteCallback, ServiceErrorCallback);
}
You should also have defined the bodies of the callback functions in your script block with the following signatures:
function ServiceCompleteCallback(ResponseAsJSON, ResponseAsXml, ResponseAsText)
{
// write your code here...
}
function ServiceErrorCallback(args)
{
// display a friendly error message...
}