CircleHotSpot.Y Property

Note: This property is new in the .NET Framework version 2.0.

Gets or sets the y-coordinate of the center of the circular region defined by this CircleHotSpot object.

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

public int Y { get; set; }
/** @property */
public int get_Y ()

/** @property */
public void set_Y (int value)

public function get Y () : int

public function set Y (value : int)

Property Value

The y-coordinate of the center of the circular region defined by this CircleHotSpot object. The default is 0.

The Y property allows you to get or set a value that represents the y-coordinate of the center of the circular region defined by this CircleHotSpot object. To completely define a CircleHotSpot object, you must specify a value for the Y property as well as the X and Radius properties.

The following code example demonstrates how to create an ImageMap control that contains two CircleHotSpot objects. One is created declaratively; its X, Y, and Radius properties are likewise set declaratively. The other is created programmatically and its X, Y, and Radius properties are set programmatically. 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="C#" %>

<script runat="server">
  void Page_Load (object sender, EventArgs e)
  {
    // Programmatically create a CircleHotSpot object.
    CircleHotSpot Circle1 = new CircleHotSpot ();

    // Set properties on the CircleHotSpot object.
    Circle1.HotSpotMode = HotSpotMode.Navigate;
    Circle1.NavigateUrl = "http://www.tailspintoys.com";
    Circle1.X = 145;
    Circle1.Y = 120;
    Circle1.Radius = 75;
    Circle1.AlternateText="Shop for toys";

    // Add the CirclHotSpot object to the
    // Shop ImageMap control's HotSpotCollection.         
    Shop.HotSpots.Add (Circle1);
  }

</script>

<html>
<head id="Head1" runat="server">
  <title>CircleHotSpot Properties Example</title>
</head>
  <body>
    <form id="Form1" runat="server">
    
      <h3>CircleHotSpot Example</h3>
      
      <h4>Shopping Choices:</h4>
      
      <asp:imagemap id="Shop"           
        imageurl="Images/ShopChoice.jpg"
        alternatetext="Shopping choices" 
        runat="Server">
        
        <asp:circlehotspot
          navigateurl="http://www.cohowinery.com"
          x="145"
          y="290"
          radius="75"
          hotspotmode="Navigate"
          alternatetext="Shop for wine">
        </asp:circlehotspot>
        
      </asp:imagemap>
      
    </form>      
  </body>
</html>

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

Community Additions

ADD
Show: