Tutorial :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 event, before doing anything else I have put:


But this has not changed the behaviour.

Any help appreciated.




You could handle the case in code so when no image is present, you display a static blank image instead.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »