locked
Getting Coordinates of an ImageButton When Clicked! RRS feed

  • Question

  • User14897813 posted

    write these code to ImageButton_Click block

    int[] koordinatlar=Request.MapImageCoordinates("ImageButton1");
    Response.Write("Koordinatlar= ");
    for(int i=0;i<koordinatlar.Length;i++)
    {
    Response.Write(koordinatlar.ToString() + ", ");
    }
    Response.Write("<br>");
    Response.Write(e.X.ToString() + ", " + e.Y.ToString());
    }

    Tuesday, January 9, 2007 6:04 AM

All replies

  • User403949901 posted
    may i know in what scenario, we might need to find the co ordinates of a image button click
    Thursday, January 11, 2007 7:43 PM
  • User14897813 posted

    lets make a scenarios: 

    1)u can use this code whether u want to take the color of the imagebutton
    2)u can use this code whether u want to take coords of a city,town in a map

    i can consume much more scenarios with that.Are the scenarios above enough for you or shall i write much more???

     

    Friday, January 12, 2007 5:10 AM
  • User403949901 posted

    Maybe you can help me with this stuff

    http://forums.asp.net/thread/1528798.aspx

    can you give me your opinion on this thread.

    Friday, January 12, 2007 8:25 AM