Image handler page
I created an image handler page which retrieves the physical path of an image on the local machine and then using filestream, resizes and displays it - using a integer (record id) passed as querystring.
What is happening is that, when the routine in pageload cannot find an image relating to the record id, it displays random images (from other records).
This only ocurrs when the related record id has no image. The routine assigns a default image if no image exists for the record, but instead of displaying the default image, the page is displaying images from other records. If I keep refreshing the page it displays different images from other records.
In my page load e开发者_开发知识库vent, before doing anything else I have put:
Response.Cache.SetCacheability(HttpCacheability.NoCache)
But this has not changed the behaviour.
Any help appreciated.
thanks,
KS
You could handle the case in code so when no image is present, you display a static blank image instead.
精彩评论