Graphics in ASP.Net (c#)
Asked Answered
B

3

6

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

Beauharnais answered 15/1, 2010 at 15:10 Comment(0)
C
8

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

Collaborationist answered 15/1, 2010 at 15:17 Comment(2)
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?Beauharnais
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?Beauharnais
R
4

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

Rifkin answered 15/1, 2010 at 15:21 Comment(3)
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. BobBeauharnais
I like this solution, but have to mention that IE doesn't support svg.Sorrells
Yes, David I found that out. This is why I am now looking for a JavaScript solution.Beauharnais
J
0

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).

Journalist answered 15/1, 2010 at 15:34 Comment(1)
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. BobBeauharnais

© 2022 - 2024 — McMap. All rights reserved.