ESRI.ArcGIS.ADF.Web.UI.WebControls
ExecuteTask Method
See Also 
ESRI.ArcGIS.ADF.Web.UI.WebControls Namespace > FloatingPanelTask Class : ExecuteTask Method




Performs the main work of the task. Sets any content to be returned to the client in the CallbackResults. Inheriting tasks must override this method.

Syntax

Visual Basic (Declaration) 
Public MustOverride Sub ExecuteTask() 
Visual Basic (Usage)Copy Code
Dim instance As FloatingPanelTask
 
instance.ExecuteTask()
C# 
public abstract void ExecuteTask()

Remarks

Tasks override this method to perform the core work of the task. This method is called automatically on the server after the user runs the task on the browser. This base version of ExecuteTask has no implementation, so you do not need to call the base method in your version.

Typically, a task uses values entered on the browser when executing the task. These values are stored in the protected _callbackArg property. You can extract the values from this property and use them to execute your task. If you override GetCallbackResult, you can preprocess the _callbackArg. A common reason for doing this is to store values in the Input object collection, which can be reused if the user runs the task again from the TaskResults. In this case, ExecuteTask should access user inputs from the Input object rather than _callbackArg, so that the task runs properly whether the task is run from original user values, or from ones stored in the TaskResults.

ExecuteTask typically should store its results in the Results property of the task. The results should be one of the following types. Other types will cause a node with the message "no results found" to be displayed when the task displays its results in the TaskResults control.

  • DataSet, including an object that extends DataSet. Most typically the results will be a type that extends GraphicsLayer. This will allow the user to select and display results on the map.
  • TaskResultNode.
  • SimpleTaskResult.

The GetCallbackResult method will automatically output the Results to the CallbackResults of the task, and then send these results to the client. You can also add additional items directly to the CallbackResults property of the task. This would be appropriate if, for example, you needed to modify the content of another control, or to run a JavaScript command on the client when the task completes. See the remarks in the CallbackResults property for discussion on using the CallbackResults collection.

See Also

© 2010 All Rights Reserved.