string strTestMessage
= DateTime.Now.Millisecond.ToString() + " -- This is a Test ";
Font font = new Font("Arial",16, FontStyle.Bold);
// create a new bitmap image.
Bitmap image = new Bitmap(300,60);
Graphics g = Graphics.FromImage(image); // get a
graphics context to draw to
g.Clear(Color.Aqua); // paint the
background of the image
g.DrawString( strTestMessage,font,SystemBrushes.WindowText,10,10);
ImageCanvas1.Image = image; // the default output format is
JPEG // the image will now be drawn to the webpage