Is it possible to display simple point and draw graphics on an ASP.NET page?

  • Thread starter Thread starter Jheitmuller
  • Start date Start date
J

Jheitmuller

Hi, I would like to convert a VB.NET application from being a Windows
app to an ASP.NET app. I'm new to web development, so this may be a
simple question. Is it possible to render simple drawing commands in
an ASP.NET application? Something line draw a line point to point, or
draw a circle at this point. If so, can somebody point me toward the
library or technique to use? I can figure it out if I can get pointed
in the right direction.

I've not been able to find anything on the web about this, so I think
I'm either not thinking about it in the right context or its just not
done within the confines of an ASP.NET app.

Thanks,
John
 
Specific questions about drawing would likely be best answered in this
newsgroup:
microsoft.public.dontnet.framework.drawing

ASP.NET will just see your output as another image. You point to your
output with a standard HTML image tag.
<image url='MyImage.jpg'>
or
<image url='MyImageGeneratorPage.aspx'>
 
You draw in ASP.Net the same way you draw in a Windows application. Use the
System.Drawing namespace.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
His question might be related to who the image data gets streamed to the
browser and rendered.

I have never done this but here are some stuff that may get you going in the
write direction.

Remember, images rendered on the browser use the <img> tag. <img> tags
point to resources on the host server. A common tactic is to set the source
for the image to some ASPX page. Then, when the resource is requested, the
ASPX page dynamically generates some image formatted data, such as JPG or
GIF. You would then set the ContentType property on the HttpResponse object
so that browser know that it is in fact image data that it is retrieving.

This article might help. Although they are loading the file from disk, the
same principle applies when you create an image dynamically.
http://authors.aspalliance.com/stevesmith/articles/displayimage.asp
 
Back
Top