C
Cory J. Laidlaw, Beyond01.com
Hi,
I am trying to draw a simple graph using ASP.NET without using a 3rd party
control.
I only want to draw a simple horizontal bar chart, save it to a JPG and
render it on my web form.
There are several articles using GDI(?) for this, but they all relate to
windows forms, not web forms. My attempts to convert it to using on a web
form aren't working too well.
Does anyone have an example of how to do this from ASP.NET? Help greatly
appreciated! Thanks!!
Cory
P.s. Here is my first shot at a prototype. as you can see, nothing happens...
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
Dim bmp As New Bitmap(200, 200)
Dim fg As Graphics = Graphics.FromImage(bmp)
fg.FillRectangle(Brushes.Aqua, 50, 50, 100, 100)
bmp.Save("Test.bmp")
Image1.ImageUrl = "test.bmp"
End Sub
I am trying to draw a simple graph using ASP.NET without using a 3rd party
control.
I only want to draw a simple horizontal bar chart, save it to a JPG and
render it on my web form.
There are several articles using GDI(?) for this, but they all relate to
windows forms, not web forms. My attempts to convert it to using on a web
form aren't working too well.
Does anyone have an example of how to do this from ASP.NET? Help greatly
appreciated! Thanks!!
Cory
P.s. Here is my first shot at a prototype. as you can see, nothing happens...
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
Dim bmp As New Bitmap(200, 200)
Dim fg As Graphics = Graphics.FromImage(bmp)
fg.FillRectangle(Brushes.Aqua, 50, 50, 100, 100)
bmp.Save("Test.bmp")
Image1.ImageUrl = "test.bmp"
End Sub