CircleHotSpot Constructor ()


Initializes a new instance of the CircleHotSpot class.

Namespace:   System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

Public Sub New

Use this constructor to initialize a new instance of the CircleHotSpot class.

The following code example demonstrates how to programmatically create two CircleHotSpot objects, set their properties, and add them to the ImageMap control's HotSpotCollection. For this example to work correctly, you must supply your own image for the ImageUrl property and update the path to the image appropriately so that the application can locate it.

<%@ page language="VB" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<script runat="server">
  Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)

    ' Programmatically create a CircleHotSpot object.
    Dim Circle1 As New CircleHotSpot
    Circle1.HotSpotMode = HotSpotMode.Navigate
    Circle1.NavigateUrl = ""
    Circle1.X = 145
    Circle1.Y = 120
    Circle1.Radius = 75
    Circle1.AlternateText = "Shop for toys"

    ' Programmatically create a second CircleHotSpot object.
    Dim Circle2 As New CircleHotSpot
    Circle2.HotSpotMode = HotSpotMode.Navigate
    Circle2.NavigateUrl = ""
    Circle2.X = 145
    Circle2.Y = 290
    Circle2.Radius = 75
    Circle2.AlternateText = "Shop for wine"

    ' Add the CirclHotSpot objects to the
    ' Shop ImageMap control's HotSpotCollection.         

  End Sub


<html xmlns="" >
<head id="head1" runat="server">
  <title>CircleHotSpot Constructor Example</title>
    <form id="form1" runat="server">

      <h3>CircleHotSpot Constructor Example</h3>

      <h4>Shopping Choices:</h4>

      <asp:imagemap id="Shop"           
        alternatetext="Shopping choices" 


.NET Framework
Available since 2.0
Return to top