R
rtmc
Can anyone help me with the following issue? I am STUCK. I'll make
this as basic as I can... I have an ASP.Net admin page that allows
users to post images to the server, and the images are displayed as
thumbnails on the same page. So, if you post a new image for
'Image1', the image is uploaded on button click, and the user then
sees their image in the appropriate spot below. Clicking on the image
fires off to a page that deletes the image, and the returns the to the
upload page, where their image placeholder is now empty. So far, so
good... Here's where my problem occurs - if I delete an image, and
then add a new one right behind it, they keep the same name. (Has to
be done this way). So, if I upload a picture of a football for 'Image
1', it will save as image1.jpg. If I then delete it and add a new
'Image 1' (say a basketball), it is the NEW image1.jpg.
The issue occurs when I delete an image, and replace it. On postback,
the OLD image is showing, even though the new image is what displays
in the file structure. (Example - post football, delete football,
post basketball, football is showing...) If I hit refresh, I then see
the new image, but this is not acceptable. I need the new image to
show immediately upon postback after uploading.
There's the background - I am fairly certian this is a caching issue.
I have:
added : Response.Cache.SetCacheability(HttpCacheability.NoCache); to
the PageLoad, with no luck.
added: <%@ OutputCache Duration="1" Location="none" VaryByParam="none"
%> to the aspx page in the header, with no luck.
Shut down the computer and tried again, with no luck.
Emptied my cache - no luck...
Finally, I went to my Internet Options in IE and set pages to 'Check
for Newer Versions of Stored Pages' every time - and this DID work.
However, I can't tell all of my users to do this.
So, I did get something to work, but that won't cut it. I need to
somehow get the exact same functionality by using code. Everything I
know of (mentioned above) is not working... Is there anyone out there
who can help me out? I am at my wits end over this!!!!
Thanks,
Ryan
this as basic as I can... I have an ASP.Net admin page that allows
users to post images to the server, and the images are displayed as
thumbnails on the same page. So, if you post a new image for
'Image1', the image is uploaded on button click, and the user then
sees their image in the appropriate spot below. Clicking on the image
fires off to a page that deletes the image, and the returns the to the
upload page, where their image placeholder is now empty. So far, so
good... Here's where my problem occurs - if I delete an image, and
then add a new one right behind it, they keep the same name. (Has to
be done this way). So, if I upload a picture of a football for 'Image
1', it will save as image1.jpg. If I then delete it and add a new
'Image 1' (say a basketball), it is the NEW image1.jpg.
The issue occurs when I delete an image, and replace it. On postback,
the OLD image is showing, even though the new image is what displays
in the file structure. (Example - post football, delete football,
post basketball, football is showing...) If I hit refresh, I then see
the new image, but this is not acceptable. I need the new image to
show immediately upon postback after uploading.
There's the background - I am fairly certian this is a caching issue.
I have:
added : Response.Cache.SetCacheability(HttpCacheability.NoCache); to
the PageLoad, with no luck.
added: <%@ OutputCache Duration="1" Location="none" VaryByParam="none"
%> to the aspx page in the header, with no luck.
Shut down the computer and tried again, with no luck.
Emptied my cache - no luck...
Finally, I went to my Internet Options in IE and set pages to 'Check
for Newer Versions of Stored Pages' every time - and this DID work.
However, I can't tell all of my users to do this.
So, I did get something to work, but that won't cut it. I need to
somehow get the exact same functionality by using code. Everything I
know of (mentioned above) is not working... Is there anyone out there
who can help me out? I am at my wits end over this!!!!
Thanks,
Ryan