title: how to write text and an image to a Response.OutputStream in ASP.NET
body: <p>I'm drawing an image and outputing it to web page using the following code:</p>
  
  <pre><code>Bitmap image = new Bitmap(350, 350);
  Graphics g = Graphics.FromImage(image);
  // code using g to draw image here
  image.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Gif);
  </code></pre>
  
  <p>This works fine. Now I'd like to add a some text to the output (javascript). However, when I do* either the text isn't displayed or image comes out as garbage. </p>
  
  <p>What's the proper way to do it?</p>
  
  <p>(*- I changed the contenttype and used reponse.write. Also tried writing a byte array of text to the outputstream.)</p>