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.
Visual Basic (Declaration) | |
---|---|
Sub ServerAction( _ ByVal args As ToolEventArgs, _ ByVal info As LayoutImageDataFrameInfo _ ) |
Visual Basic (Usage) | Copy Code |
---|---|
|
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.
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).