I found where is the issue.If I clear cache data in Internet Explorer and run the code,it is working fine.IE displays the image from the cache data instead of displaying from the temp folder where the image is stored.But I don't know how to solve this.I want the image to be displayed from the temp folder in my server.

Anyone who knows can suggest me a good solution.