How to create annotation on System.Web.UI.WebControls.Image

G

Guest

In our web application (asp.net) we are trying to create annoation on the
image displayed in System.Web.UI.WebControls.Image control. But there is no
support for mouse events in this control. Is there any way out to do this
using this control or any other control?

Thanks in advance.

Suresh
 
J

Jevon

Could you use an Image Button to achieve this? It would post back when the
user clicked on it, and I believe you could then get the X+Y in the post
back event? Not able to test this at the moment, but it seems like the
logical route. Unless you wanted people to actually draw on the image?

If you wanted to get fancy with people clicking, typing in an annotation and
then it submitting, you'd have to go along the route of javascript with a
floating div which is shown when the user clicks on the image - which would
be a normal image control. You'd have a textbox and a submit button in the
div.

Jevon
 
P

Patrice

You could do it client side or you could use an input type=image (using HTML
if not provided as a server side control). This way you are able to get the
coordinates where the image is clicked and you could either :
- postback and redisplay all asking for the text
- or do this client side and post only once the text is entered

You'll have also to do some work to display the labels at the appropriate
location...
 

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,996
Messages
2,570,238
Members
46,826
Latest member
robinsontor

Latest Threads

Top