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

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
 
S

Steve C. Orr [MVP, MCSD]

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'>
 
K

Kevin Spencer

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

Peter Rilling

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
 

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
474,444
Messages
2,571,709
Members
48,796
Latest member
Greg L.
Top