ESRI.ArcGIS.ADF.Web.UI.WebControls
ClientAction Property
See Also 
ESRI.ArcGIS.ADF.Web.UI.WebControls Namespace > InteractiveToolbarItem Class : ClientAction Property




Javascript action to invoke on the client-side. Required for a Tool. Optional for Command and DropDownBox.

Syntax

Visual Basic (Declaration) 
<ResDescriptionAttribute("Javascript action to invoke on the client-side.  Required for Tools. Optional for Commands and Selects.")>
<EditorAttribute(EditorBaseTypeName="System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", EditorTypeName="ESRI.ArcGIS.ADF.Web.UI.WebControls.Design.ClientToolActionEditor, ESRI.ArcGIS.ADF.Web.UI.WebControls, Version=10.0.0.0, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86")>
<ResCategoryAttribute("Client Action")>
<ResDefaultValueAttribute()>
<NotifyParentPropertyAttribute(True)>
Public Property ClientAction As String
Visual Basic (Usage)Copy Code
Dim instance As InteractiveToolbarItem
Dim value As String
 
instance.ClientAction = value
 
value = instance.ClientAction
C# 
[ResDescriptionAttribute("Javascript action to invoke on the client-side.  Required for Tools. Optional for Commands and Selects.")]
[EditorAttribute(EditorBaseTypeName="System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", EditorTypeName="ESRI.ArcGIS.ADF.Web.UI.WebControls.Design.ClientToolActionEditor, ESRI.ArcGIS.ADF.Web.UI.WebControls, Version=10.0.0.0, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86")]
[ResCategoryAttribute("Client Action")]
[ResDefaultValueAttribute()]
[NotifyParentPropertyAttribute(true)]
public string ClientAction {get; set;}

Remarks

A tool, command or drop-down box may perform actions on the client, either prior to a server action or as an independent client-side action. ClientAction specifies this client action. This property may specify one of the built-in client actions that perform standard actions on the map or page layout. These use one of the values in the MapClientToolAction enumeration (such as Point or DragRectangle) or the PageClientToolAction enumeration.

If using a custom action, you can specify just the name of the javascript function to call. That function can pass the name of the toolbar and the name of the tool. The value Toolbar will be replaced with the toolbar name, and ToolbarItem will be replaced with the Name of the toolbar item. For example, if ClientAction is set like this:

myToolItem.ClientAction = "myClientFunction('Toolbar', 'ToolbarItem')";
Then a JavaScript function may be included on the page that uses these values, like this:
function myClientFunction(toolbarName, toolbarItemName) {
               alert("You clicked tool " + toolbarItemName + " on toolbar " + toolbarName);
            }

The custom action may operate on the map or page layout, or may perform some other action on the page.

See Also

© 2010 All Rights Reserved.