Documentation for: ASP.NET Ajax Version 1.0

This documentation is for a previous version. For the current released version, see the ASP.NET Ajax documentation on MSDN.

 

 

 

 

 

 

 

Generated Proxy Classes Constructor

Creates a new instance of the generated proxy class. The constructor exists at run time after the proxy class has been generated by the server.

note

The name of the constructor is based on the Web service that it is generated from.

Syntax

var myServiceProxy = new MyNameSpace.MyService();

Remarks

The constructor enables you to create an instance of the proxy class. After creating the proxy class instance, you can set its callback functions and optionally set its time-out or user-context properties. You can then use the proxy instance to call the associated Web service methods.

You generally create instances of the generated proxy class when you want to apply different defaults such as the callback functions to different Web service calls. By using different callback functions, you can process the returned data in different ways, depending on your application needs. Calling methods of the proxy instance also simplifies the syntax of calling Web service methods and the logic of callback functions.

Example

The following example shows how to instantiate a proxy class.

javascript

proxyInstance = 
    new  Samples.AspNet.UsingProxyClass();