Link to home
Start Free TrialLog in
Avatar of sjd01032
sjd01032

asked on

Need to "draw" line (mouse click/drag) on a graphic displayed on ASP.NET page and save changed graphic.

Hello Experts!  I've searched this one up and down and can't find an easy solution.

1.  When the ASP.NET 2.0 page is loaded it will display a default graphic (how - I don't care).

2.  The user of the page must be able to use their mouse (pointing device) to click and drag to form lines.  I mean the same as drawing a "freehand" type of line on a piece of paper - NOT click point A then move mouse to point B and click again and have a straight line between the two points.

3.  The default graphic is now modified (unless you have a better idea) and must be saved in the DB (I can handle that).  When the next user opens the page they are presented with the default graphic.  When the returning user opens the page they are presented with their modified graphic.

Please let me know if any of this doesn't make sense.  The solution has to work within a MasterPage and live pleasantly with AJAX 1.0.  I'll be on tonight watching for Q and A.  I'm looking for quick and dirty on this one.  Thanks in advance!
Avatar of Solar_Flare
Solar_Flare

this is going to be difficult - I have been considering doing client side design in asp.net and I think it will take far more time than I have free...


basically you would need to write javascript that handles the mouse movement and mouse clicks (you will probably have to support only 1 browser to get this working nicely) to actually capture and render the drawing. You also need to dynamically add a whole lot of hidden inputs to the form which represent the path of the lines etc - upon postback you would capture these values to be able to recreate the path of the lines.

you would be better off using a java applet, flash or silverlight to do this.
also, have a look at http://www.xdraw.org/

I don't know if it supports freehand drawing, but it may be of help

Avatar of sjd01032

ASKER

Thanks for the link.  Unfortunately it's not working - maybe too early in the morning :)

I've been told that my predecessor had a working prototype that used something found on CodeProject.  I looked there and the www.asp.net site with no luck.  Of course my brilliant predecessor didn't bother to use source control and his manager has no idea what he was doing.  I'm guessing about 25% of this is true, but my point is that I'll take what I can get - be it a cheap widget or some free source.

Thanks again!
All I need to do is "draw" a line where the mouse is clicked and dragged over an image - and then save the image with the line (or scribble).  I don't need anything fancy - no colors, no straight lines, etc.  Any help would be really appreciated!
Should I be in a different EE category?
Maybe an ActiveX solution?
ASKER CERTIFIED SOLUTION
Avatar of sjd01032
sjd01032

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial