Link to home
Start Free TrialLog in
Avatar of twcadmin
twcadmin

asked on

C# write image and text on page

I am trying to create a page that queries a database and draws an image to the page with a chart of the data. The problem is that I cant figure out how to write both text to the page AND an image(the chart).

I could write my text and use <img src="drawChart.aspx?value1=test1&value2=test2" /> to have an image written dynamically BUT I dont want to have to pass all of those values in the URL, I want to be able to simply read my datareader and draw the image on the page.

Any ideas or examples I can look at?
ASKER CERTIFIED SOLUTION
Avatar of Jaime Olivares
Jaime Olivares
Flag of Peru image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of twcadmin
twcadmin

ASKER

I know how to draw an image to page but once I set content  type to image/jpeg it just shows the image. Otherwise I get my text with a bunch of bytes that represents the image. If I make the part that creates an image into a control, will this solve the problem or will I still have to pass parameters to it in the URL?

Are there any code sampels out there that demonstrate this? I've never created a control before.
Have you taken a look at this control..
http://www.eggheadcafe.com/articles/20050911.asp

It might be what you are looking for.

Good Luck!