WebService in the calling server in the front desk is needed to use WebService.htc to download from the website.
To add a WebService behavior in a web page, you need to specify this behavior to an element on the page.
In this example, WebService.htc places the root directory of the project folder
Service.useservice ("http://localhost/asptest/webservice1_helloworld/service1.asmx? WSDL", "MySelect");
UseServie can create an instance of a client object. The above sentence will create an attribute on the service object, MySelect, and specify a client object based on Service1.asmx Web service. After creating this object, the call to the remote method will be done in the following way.
MySelect.CallService ("FunctionName", "ServiceName", ARGS);
Call the callService method on the returned object and use the name of the callback function. The method on the web service and its parameters are parameters for this method.
Such as:
MySelect.CallService (showcode, "ischange", 0, "name");
When returning the iSChange method, the Webserve behavior calls the showcode function that sets the DIV's InnerHTML to the value of the return result.
Function showcode (result)
{
// Result Save the result of the call to the Web service
Service.innerhtml = Result.Value;
}