Image Area BaseAction Property
This defines the action to take when the area is clicked
Definition
Namespace: EWSoftware.ImageMaps.Web.Controls
Assembly: EWSoftware.ImageMaps.Web.Controls (in EWSoftware.ImageMaps.Web.Controls.dll) Version: 2024.12.31.0
The default is to navigate to the URL specified in the NavigateUrl property
Assembly: EWSoftware.ImageMaps.Web.Controls (in EWSoftware.ImageMaps.Web.Controls.dll) Version: 2024.12.31.0
C#
public AreaClickAction Action { get; set; }VB
Public Property Action As AreaClickAction
Get
SetC++
public:
property AreaClickAction Action {
AreaClickAction get ();
void set (AreaClickAction value);
}F#
member Action : AreaClickAction with get, setProperty Value
AreaClickActionThe default is to navigate to the URL specified in the NavigateUrl property
Example
This example demonstrates creating web server image map areas. It shows the various ways that the
Action, NavigateUrl, and Target properties can be used.
Example Control Usage
<%@ Register TagPrefix="EWSI" Namespace="EWSoftware.ImageMaps.Web.Controls"
Assembly="EWSoftware.ImageMaps.Web.Controls" %>
<ewsi:ImageMap id="imMap" runat="server" ToolTip="A test image"
ImageUrl="Images/Shapes.jpg" BorderStyle="Solid" BorderWidth="1px">
<ewsi:ImageAreaPolygon
ToolTip="Load google.com in search pane"
NavigateUrl="http://www.google.com" Target="Search"
Coordinates="150,156,218,256,250,222,244,200,268,188,294,188,258,140,220,144,178,124"
TabIndex="4" AccessKey="P"></ewsi:ImageAreaPolygon>
<ewsi:ImageAreaRectangle ToolTip="Go to www.EWoodruff.us"
Rectangle="15, 16, 149, 93" NavigateUrl="http://www.ewoodruff.us"
TabIndex="2" AccessKey="R"></ewsi:ImageAreaRectangle>
<ewsi:ImageAreaRectangle ToolTip="Only displays this tool tip"
Rectangle="316, 175, 208, 122" Action="None">
</ewsi:ImageAreaRectangle>
<ewsi:ImageAreaCircle
ToolTip="Load Microsoft.com in a new window" CenterPoint="380, 88"
Radius="60" NavigateUrl="http://www.microsoft.com" Target="Blank"
TabIndex="3" AccessKey="C"></ewsi:ImageAreaCircle>
<ewsi:ImageAreaRectangle ToolTip="Execute client-side script"
Rectangle="12, 202, 134, 46"
NavigateUrl="javascript: alert('Execute any client-side script');"
TabIndex="5"></ewsi:ImageAreaRectangle>
<ewsi:ImageAreaRectangle
ToolTip="Click to enable/disable the other image map"
Rectangle="6, 262, 194, 40" TabIndex="6" Action="PostBack"
AccessKey="D"></ewsi:ImageAreaRectangle>
</ewsi:ImageMap>
<ewsi:ImageMap id="imClickMap" runat="server" ToolTip="Click an area to post back"
ImageUrl="Images/PostBack.jpg" CausesValidation="True">
<ewsi:ImageAreaRectangle Rectangle="0,0,20,20" Action="PostBack"
ToolTip="Area 1" TabIndex="7" AccessKey="1" />
<ewsi:ImageAreaRectangle Rectangle="80,0,20,20" Action="PostBack"
ToolTip="Area 2" TabIndex="8" AccessKey="2" />
<ewsi:ImageAreaRectangle Rectangle="0,80,20,20" Action="PostBack"
ToolTip="Area 3" TabIndex="9" AccessKey="3" />
<ewsi:ImageAreaRectangle Rectangle="80,80,20,20" Action="PostBack"
ToolTip="Area 4" TabIndex="10" AccessKey="4" />
</ewsi:ImageMap>