ASPxClientCallback = _aspxCreateClass(ASPxClientControl, { constructor: function(name) { this.constructor.prototype.constructor.call(this, name); this.CallbackComplete = new ASPxClientEvent(); }, SendCallback: function(parameter) { this.PerformCallback(parameter); }, PerformCallback: function(parameter) { if(!_aspxIsExists(parameter)) parameter = ""; this.CreateCallback(parameter); }, OnCallback: function(result) { var args = new ASPxClientCallbackCompleteEventArgs(result.parameter, result.data); this.CallbackComplete.FireEvent(this, args); } }); ASPxClientCallback.Cast = ASPxClientControl.Cast; ASPxClientCallbackCompleteEventArgs = _aspxCreateClass(ASPxClientEventArgs, { constructor: function(parameter, result){ this.constructor.prototype.constructor.call(this); this.parameter = parameter; this.result = result; } });