BitMap Problem RRS feed

  • Question

  • User358219120 posted

    Hello All,

    i have created a 2d line chart and it displays on the aspx page when i put this in the page_load method

    bitmap.Save(Response.OutputStream, ImageFormat.Jpeg);


    but when i put this line in another method and call it, it simply just prints out all the bytecodes 


    does anyone know how to fix this??


    thanks agaun

    Friday, February 17, 2006 4:27 PM

All replies

  • User-1372641848 posted

    You probably need to set correct content type for your image. and remove other things from response using Response.Clear and Response.End


    Response.ContentType = "image/pjpeg";

    bitmap.Save(Response.OutputStream, ImageFormat.Jpeg);


    Sunday, February 19, 2006 12:21 PM