custom, clickable image

C

C Williams

Hi,

What I am trying to build is an image created on-the-fly to be displayed
in an aspx page. I can do this, using GDI+, no problem. The catch is
that now I would like the ability to carry out customized actions based
on where a user clicks on the image (basically as if rectangles or
circles within the image were hyperlinks, though other actions than
hyperlinking would be nice options).

Is there any way to do this? Even if I could just get click-handling
information, I could work with that, but I haven't yet found much to
work with...

Thanks for any help you can give,

-Casey
 
S

S. Justin Gengo

Casey,

Take a look at the ImageUpload project on my website,
www.aboutfortunate.com. Specifically look at the ImageDelivery.aspx page.
That page takes an image being stored in an in-memory datatable and outputs
it right into a webbrowser. If you do the same thing with your image you
could then make the image part of an imagemap and that would give you the
result you're looking for. The ImageProject may be found by clicking the
"Code Library" link at the top of my site and then clicking the "Image
Upload" button on the left side of the page.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
 
B

Bruce Barker

you have two options.

1) use an image button, which will supply the x and y positions on a click
2) use an client image map and image

<IMG SRC="myImageGen.aspx" WIDTH=504 HEIGHT=126
BORDER=0 USEMAP="#myMap">
<MAP NAME="myMap">
<AREA SHAPE="rect" COORDS="0,0,82,126"
HREF="pick1.aspx">
<AREA SHAPE="circle" COORDS="124,58,8"
HREF="pick2.aspx">
<AREA SHAPE="poly" COORDS="221,34,238,37,257,32,278,44,284,60,
281,75,288,91,267,87,253,89,237,81,229,64,228,54"
HREF="pick3.aspx">
</MAP>

-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top