ESRI.ArcGIS.ADF.Web.UI.WebControls
ServerAction Method
See Also 
ESRI.ArcGIS.ADF.Web.UI.WebControls.Tools Namespace > IPageServerToolAction Interface : ServerAction Method




args
Holds the results of the client-side interaction.ToolEventArgs
info
Information on the dataframe in which the user performed the client-side interaction. This parameter is null for all actions that occur on the page as a whole. It is valid only for actions that occur on just the maps in a page layout.
This is the method at which the server-side action is performed.

Syntax

Visual Basic (Declaration) 
Sub ServerAction( _
   ByVal args As ToolEventArgs, _
   ByVal info As LayoutImageDataFrameInfo _
) 
Visual Basic (Usage)Copy Code
Dim instance As IPageServerToolAction
Dim args As ToolEventArgs
Dim info As LayoutImageDataFrameInfo
 
instance.ServerAction(args, info)
C# 
void ServerAction( 
   ToolEventArgs args,
   LayoutImageDataFrameInfo info
)

Parameters

args
Holds the results of the client-side interaction.ToolEventArgs
info
Information on the dataframe in which the user performed the client-side interaction. This parameter is null for all actions that occur on the page as a whole. It is valid only for actions that occur on just the maps in a page layout.

Example

See the Example for the similar IMapServerToolAction interface.

Remarks

This method performs the action on the server for a Tool. A tool typically has a client-side action, where the user clicks on the PageLayout to define geometry for the action. For example, an zoom-page operation might require the user to click on the page. The geometry is passed to the server within the ToolEventArgs argument of the ServerAction method.

ToolEventArgs is an abstract class. The actual object is a type that extends ToolEventArgs to contain a specific type of geometry. For example, if the client action of a Tool is Polygon, then the argument passed to ServerAction will be a PolygonEventArgs. The geometry may be retrieved from the properties of the argument object. Cast the argument to the appropriate type in order to retrieve the geometry. Note that the geometry will be in screen pixels. These locations may be converted to ADF geometry using methods such as Point.ToMapPoint or Envelope.ToMapEnvelope.

For another example of using the similar IMapServerToolAction interface, see the Common_AddCustomTool sample in the SDK Web Applications samples (also available at ArcGIS Resource Center:http).

See Also

© 2010 All Rights Reserved.