M
Mark Denardo
I created a Web Image "<asp:Image ID="Image1" ..." that my code behind set
to a certain image file say image1.jpg
=> Image1.ImageUrl = "<rel_path>/image1.jpg";
which set the image ok, but then I replaced that image file with another
image file and gave it the same name "image1.jpg". But my web app when it
loads the image when I run the page still shows the original picture that I
deleted and replaced with the new one, even though I restarted the entire
app. I'm thinking that the image is cached in some way and needs to be
refreshed somehow, so I tried adding the following:
=> Image1.ImageUrl = "<rel_path>/image2.jpg"; (button click 2)
=> Image1.ImageUrl = "<rel_path>/image1.jpg"; (button click 1)
These are called by button clicks so I can see the results dynamically. And
what I see is when I click button2, that image shows the second image
correctly, and when I click button1, it again shows the old image I deleted
over a day ago.
How do I make my page refresh or flush that image?? (I've started and
stopped the app. a dozen times over the past day and a half and it still has
the old photo I deleted lingering in memory somewhere and doesn't want to
let it go.)
to a certain image file say image1.jpg
=> Image1.ImageUrl = "<rel_path>/image1.jpg";
which set the image ok, but then I replaced that image file with another
image file and gave it the same name "image1.jpg". But my web app when it
loads the image when I run the page still shows the original picture that I
deleted and replaced with the new one, even though I restarted the entire
app. I'm thinking that the image is cached in some way and needs to be
refreshed somehow, so I tried adding the following:
=> Image1.ImageUrl = "<rel_path>/image2.jpg"; (button click 2)
=> Image1.ImageUrl = "<rel_path>/image1.jpg"; (button click 1)
These are called by button clicks so I can see the results dynamically. And
what I see is when I click button2, that image shows the second image
correctly, and when I click button1, it again shows the old image I deleted
over a day ago.
How do I make my page refresh or flush that image?? (I've started and
stopped the app. a dozen times over the past day and a half and it still has
the old photo I deleted lingering in memory somewhere and doesn't want to
let it go.)