locked
Save Picture As ?? RRS feed

  • Question

  • I have a bizarre problem.  I am using binary streaming to display my chart.  If I right click on the chart and select "Email Picture" or "Print Picture" it works okay.  If I select "Save Picture As", the PNG image is created but it is not what I expected.  It always saves with the test image that I started off with.  This is the Binary Rendering chart provided with Chart samples.  I modified the Binary Rendering sample and was able to save it okay, so it is something related to my project.  I have no clue as to what it could be.  Any input would be appreciated.

    Thanks in advance!



    Thursday, April 23, 2009 7:08 PM

Answers

  • Probably it is some caching issue. First clean the browser cache and try to save the image again. If is OK - it is caching issue. You can try with different browser as well.
    You can control the cache on server side or on the client side by adding some unique id in the query string.

    Regards,
    Delian
    • Proposed as answer by DelianTModerator Thursday, April 23, 2009 9:47 PM
    • Marked as answer by GMONEY-ESPN Friday, April 24, 2009 12:56 PM
    Thursday, April 23, 2009 9:47 PM
    Moderator

All replies

  • After some further research, I discovered that if I right click "Save Picture As" and change the image format to "Bitmap" the image will save correctly.  So if I leave it as PNG, the save fails.  It shows a chart image that I was using this morning.  I have no clue how it remembers what it was and why only the PNG format is problematic.
    Thursday, April 23, 2009 8:36 PM
  • Probably it is some caching issue. First clean the browser cache and try to save the image again. If is OK - it is caching issue. You can try with different browser as well.
    You can control the cache on server side or on the client side by adding some unique id in the query string.

    Regards,
    Delian
    • Proposed as answer by DelianTModerator Thursday, April 23, 2009 9:47 PM
    • Marked as answer by GMONEY-ESPN Friday, April 24, 2009 12:56 PM
    Thursday, April 23, 2009 9:47 PM
    Moderator
  • Delian,

    Thank you for your reply.  I cleared out the temporary internet files and the problem went away.  Can you give me an example of adding a unique ID to the query string?  I would like to keep this from happening again if possible and I am not sure how to implement that.

    Thanks,

    Mark
    Friday, April 24, 2009 12:59 PM
  • You use binary streaming. To avoid cache you can add some unique parameter like GUID to the query string like - my_bynary_chart.aspx?guid=1233-1231-fdfsd-4543.

    You can also control the cache from code behind in the page where the chart image is streamed back -  try Response.CacheControl = "no-cache"; or read the docs for Response.Cache control.

    Delian

    Friday, April 24, 2009 5:08 PM
    Moderator