Client Class AjaxMethodCallback

This javascript class allows making remote method callbacks to the server using JSON messaging. The control calls back to ASPX pages or control on a page that contain methods marked up with a [CallbackMethod] Attribute.

The client code is very simple:

var Manual = new AjaMethodCallbackAjaxMethodCallback("Callback","SimpleMethodcallbacks.aspx");

Manual.targetControlId = "Page";  // optionally specify control ID

// *** Call method: Method name, Array of parameters, Callback and Error handlers
function  ManualMethod_Callback(Result)
	alert(Result); // 434
function OnPageError(OnPageError)

Using this class provides declarative logic to make a remote method calls from JavaScript code including the ability to route calls to a specific server control. This makes this a powerful tool for control developers to have client code communicate back to their controls in a control localized manner.


This class requires use in conjunction with the server sie wwCallbackMethod control which provides the server side method processing semantics.

Class Members



This method is the raw method that initiates method callback to a AjaxMethodCallback control or a wwCallbackHandler derived Http handler on the server routing to methods marked with [CallbackMethod] attributes on the target object.



When posting back POST data this value specifies which form is posted back. If not specified document.forms[0] is used.


Determines how data is posted to the server.


Determines what type of result is expected.


The Url that is to be called on the server. This value is typically set by the Constructor call.


The control on the server that the callback is routed to. By default the Page object receives the callback and this is the default if this property is not provided.


Timeout in milliseconds of the XHR instance making the callback by which time the request has to complete.

See also:

Class AjaxMethodCallback

© West Wind Technologies, 1996-2024 • Updated: 02/01/16
Comment or report problem with topic