Class AjaxMethodCallback

The AjaxMethodCallback control provides an easy mechanism for making page or control level method callbacks from an HTML page. Working with both client side and server side logic you can make remote method calls from the client using two-way JSON serialization to access server side content from client pages. Methods are mapped from server to the client with an optional client proxy class that allows making direct method calls to the server. Methods on the server are marked up with a [CallbackMethod] to indicate that the methods are accessible for callbacks. These methods can be implemented on the page, any user control, or custom server control. The latter also allows control developers to dynamically route callbacks to their own controls.

Methods called use JSON to pass data and simple types, hierarchical objects, arrays and IList based classes are supported for two-way transfers. DataSets/DataTables/DataRows are support for downloading only at this time.

This control makes accessing server side content as easy as calling a single proxy method and implementing a single client side handler to receive the result value as a strongly typed object.

System.Object
  System.Web.UI.Control
    Westwind.Web.Controls.AjaxMethodCallback

public class AjaxMethodCallback : Control

Class Members

MemberDescription
Constructor
GetCallbackEventReference Returns an Event Callback reference string that can be used in Client script to initiate a callback request.
public string GetCallbackEventReference( string QueryStringExpression );
ClientID Override to force simple IDs all around
ClientProxyTargetType A type that is used to generate the Client Proxy Javascript class that gets injected into the page with matching methods.
GenerateClientProxyClass If true generates a proxy class that maps each of the methods exposed with [CallbackMethod] on the current page, user control or control and exposes it as a client side class. The name of the class will be the same as the ID of the wwMethodCallback control.
IsCallback Determines whether the current request is in a callback.
jQueryScriptLocation Determines where the jquery.js resource is loaded from. WebResources, Url or leave empty to do nothing
PostBackFormName The name of the form from which POST data is sent to the server if posting back with form data. Empty value will post back all form variables of all forms.
PostBackMode Detemines how data is sent back to the server on a method call.
ScriptLocation Determines where the ww.jquery.js resource is loaded from. WebResources, Url or an empty string (no resource loaded)
ServerUrl The Url to hit on the server for the callback to return the result. Note: Not used when doing a MethodCallback
TargetInstance An instance of the object that is going to handle the callbacks on the the server.
UniqueID Override to force simple IDs all around

Requirements

Namespace: Westwind.Web.Controls
Assembly: jquerycontrols.dll


  Last Updated: 12/3/2008 | © West Wind Technologies, 2008