ESRI.ArcGIS.ADF.Web.UI.WebControls | |
ServerAction Method | |
See Also Example |
ESRI.ArcGIS.ADF.Web.UI.WebControls.Tools Namespace > IMapServerToolAction Interface : ServerAction Method |
- args
- Holds the results of the client-side interaction.
Visual Basic (Declaration) | |
---|---|
Sub ServerAction( _ ByVal args As ToolEventArgs _ ) |
Visual Basic (Usage) | Copy Code |
---|---|
|
C# | |
---|---|
void ServerAction( ToolEventArgs args ) |
Parameters
- args
- Holds the results of the client-side interaction.
Visual Basic | Copy Code |
---|---|
Public Class MyPointToolAction |
C# | Copy Code |
---|---|
public class MyPointToolAction: IMapServerToolAction |
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 Map to define geometry for the action. For example, an identify operation might require the user to click at a point on the map. 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 this method, see the Common_AddCustomTool sample in the SDK Web Applications samples (also available at ArcGIS Resource Center:http).