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.
public class AjaxMethodCallback : Control
Member | Description | |
---|---|---|
Constructor | ||
CreateControlInstanceOnPage | Can be called to create a new instance of the AjaxMethodCallbackControl and attach it to the current page. This can be useful for control developers so they don't have to manually add the control to the page. public static AjaxMethodCallback CreateControlInstanceOnPage(Control control,
object targetInstance); |
|
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 AjaxMethodCallback 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 | |
JsonDateEncoding | Determines how the date format is serialized into JSON. | |
OverrideClientID | Determines whether ClientID and UniqueID values are returned as just as the ID or use full naming container syntax. | |
PageProcessingMode | Determines when Page level callbacks are processed in the Page pipeline. By default processing occurs in Load, but you can opt to process callbacks in Init for better performance if you don't rely on any page specific logic or POST values from controls. | |
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 | |
ServiceType | The type of service to call. For AjaxMethodCallback call the current page, control or CallbackHandler. For WCF and ASMX point at ServerUrl at a WCF or ASMX Service respectively. | |
TargetInstance | An instance of the object that is going to handle the callbacks on the the server. | |
Timeout | Timeout in milliseconds for the request. | |
UniqueID | Override to force simple IDs all around |