| Visual Basic (Declaration) | |
|---|---|
Public Class CallbackResult | |
| Visual Basic (Usage) | Copy Code |
|---|---|
| |
| C# | |
|---|---|
public class CallbackResult | |
The CallbackResult class simplifies the handling of client callbacks in the Web ADF framework. Rather than having to create your own client-side and server-side logic for handling callbacks, you can use a CallbackResult to pass information back to the browser. You can update the contents of a control or element on the page, run a javascript command, or set the source of an image on the page. For a discussion of how to set and use a CallbackResult, see the "Control Callbacks" section of the Custom tool and commands discussion in the SDK.
A CallbackResult is typically added to the CallbackResultsCollection of a Web ADF control that initiated the callback. These are stored in the CallbackResults property, which is inherited from ESRI.ArcGIS.ADF.Web.UI.WebControls.WebControl. You can "push" information into the control that initiated the callback, and the information will be sent to the client, where the JavaScript will be executed, or content or image source replaced. No extra code needs to be added on the client, since the ADF Web control's code already knows how to process the callback result. See the SDK sample "Common_Callback" (C# or VB version) for examples of this approach.
If you need to pass a callback result to the client, and your code initiated the callback outside of a Web ADF control, for example via a custom callback initiated by a button, you can pass the callback results back by calling ToString() on the CallbackResult or callback results collection. See the SDK sample "Common_Callback" (C# or VB version) for examples of this approach as well.
System.Object
ESRI.ArcGIS.ADF.Web.UI.WebControls.CallbackResult
Target Platforms:Windows XP Professional, Windows Server 2003 family