Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

C# write image and text on page

Posted on 2008-10-18
6
1,550 Views
Last Modified: 2013-12-17
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?
0
Comment
Question by:twcadmin
6 Comments
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 300 total points
ID: 22750937
you cannot "draw on the page", but you can write into a temporary image file, and refer as a regular <img>
0
 
LVL 10

Assisted Solution

by:oxyoo
oxyoo earned 100 total points
ID: 22752454
Here is an example...
http://www.developer.com/db/article.php/3691991

Also, there are third party controls that might help with this. I did something similar using Teleriks controls a while back. They are commercial though.

Good Luck!
0
 
LVL 11

Assisted Solution

by:Vivek Thangaswamy
Vivek Thangaswamy earned 100 total points
ID: 22755347
Hi
This article helps you to write the image
http://www.codeproject.com/KB/web-image/PicManager.aspx 
0
 
LVL 5

Author Comment

by:twcadmin
ID: 22757366
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.
0
 
LVL 10

Expert Comment

by:oxyoo
ID: 22757957
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!
0

Featured Post

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Iteration Help (Asp.net VB) 5 24
Formula for calculating ROI on training 6 49
Finding the IIS version 5 21
transition to visual .net from vb6 5 37
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question