UserControlTask control


In this topic


About the UserControlTask control

Application Developer Framework (ADF) tasks have been associated with server controls—redistributable bits of logic that can be integrated with Manager and leverage the ADF task framework. 
The base class for tasks included with the ADF is the server control, FloatingPanelTask. Server control development can be complex, since the controls are designed to be application agnostic and inherently distributable; therefore, more flexible. One major drawback is that the structure of the task's visual interface must be constructed programmatically. In this area, page developers can work within the context of a page, in which Visual Studio provides an interactive visual design-time interface. 
For page developers, a technique to isolate related actions visually within the context of a single application is a User control. A User control has the same visual interface and structure as a page. 
The UserControlTask control enables you to integrate an ASP.NET User control as a task within an ADF application. The Web ADF task framework includes a base class, ESRI.ArcGIS.ADF.Web.UI.WebControls.UserControlTaskPanel, you can subclass in an ASP.NET User control to gain access to task framework behavior and capabilities.
The UserControlTask only works with the ASP.NET Asynchronous JavaScript and XML (AJAX) partial postback pattern for asynchronous communication in a Web application. 
A ScriptManager must be on the page for the UserControlTask to function.  

Members

The following table shows a list of properties related to the UserControlTask control.
Property name
Type
Description
FeatureSelectionColor
color
Color of selected features.
GroupResultsByTable
bool
Determines if the task's results are grouped by layers.
HideOnSubmit
bool
Determines if the panel is hidden when the task executes.
LabelText
string
Text that shows next to the input box indicating the type of the value to enter.
NavigationPath
string
Task's path as it appears in a hierarchical data control buddied to the task's TaskManager.
SearchFields
string
List of map resource—layer—fields on which a search for a value is made.
ShowFieldAttributes
bool
Determines if the task's results have field attributes.
ShowLegend
bool
Legend is only available if GroupResultsByTable is set to true.
TaskResultsContainers
BuddyControlCollection
Controls in which results from the task display.
TaskControl
string
Path to the user control task (.ascx) that implements the UserControlTaskPanel.
Title
string
Text that shows in the panel's title bar.

Accessing ADF and task framework properties from a User control task

For an ASP.NET Web User control to plug into the ADF task framework, it must implement the UserControlTaskPanel base class.  The UserControlTaskPanel base class provides a simple Start method to pass parameters to the ExecuteTask method.  The ExecuteTask method should contain the bulk of the business logic for executing the task to generate results based on inputs.  To access the UserControlTask server control, a FloatingPanelTask which contains the framework that supports a User control, use the UserControlTask property.  The UserControlTask will provide access to traditional task server control properties such as callback results (CallbackResults) and task results containers such as a Map (TaskResultsContainers).


See Also:

Creating a custom usercontrol task
UserControl task Manager integration