views:

109

answers:

3

I need help with my latest asp.net project. It involves graphics. I need to draw a circle and have several lines going from the middle to the edge (radius). This is the part I know how to do. The next part is the part I don’t know how to do and would appreciate some advice. The users need the ability to grab the lines with their mouse and move them. For example if a line is pointing to the 90 degree mark, they might want to grab it and move it to the 45 degree mark. This will affect calculations that will display elsewhere on the page.

I will consider third party controls but would prefer a solution with coding or open source controls.

Thanks in advance.

Bob Avallone

+7  A: 

ASP.net runs on the server - it simply generates HTML (& JavaScript) which is sent to the client (eg a browser) and rendered there.

So what you need is not an asp.net solution, but indeed a rich client solution. Some of your options are:

  • Javascript
  • Flash
  • Silverlight
  • Java applet

I suspect Javascript or Silverlight will be of the most interest to you. Perhaps you want to do a little investigation, and come back with an updated question.

UPDATE Re: Bob's Comment:

A quick google found this, which seems pretty cool:

Lightweight Visual Thesauras

Winston Smith
I think I would like to pursue JavaScript as a solution. Can anyone point me to an example that is similar to what I what to do?
Bob Avallone
@Bob see updated answer
Winston Smith
I've looked at Javascript as a solution and at this point, I do not want to pursue that avenue.Silverlight now looks like a better avenue to pursue. The same question applies, does anyone know of an example that is similar to what I am trying to do?
Bob Avallone
+4  A: 

You could possibly use an svg to do the work for you, maybe modifying the work on

http://www.maa.org/joma/Volume7/Lane/Developer.html

the specific example is:

http://www.maa.org/joma/Volume7/Lane/Thales.svg

John Boker
+1 nice solution.
Winston Smith
I want to thank everyone who replied. This solution by John looks the most promising. I will pursue it and let you all know how it works out.Bob
Bob Avallone
I like this solution, but have to mention that IE doesn't support svg.
David Glass
Yes, David I found that out. This is why I am now looking for a JavaScript solution.
Bob Avallone
A: 

If you don't need to be constrained to ASP.Net, this problem is much more easily solved via a Forms app. You can net-enable it and distribute it as a ClickOnce app to get the same degree of external maintainability (if that is why you are using ASP.Net).

Jeff Kotula
It doesn't have to be asp.net, but they are looking for a web solution. I have been asked to convert a Window app. that is working, but for which they don't have the source code.Bob
Bob Avallone