Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I am writing a Asp.Net (in C#) web app and I am looking for a way to dynamically force a complete refresh (it would be like hitting "Ctrl-F5" to refresh the browser).

 

This is basically the situation: This web app is a gallery full of thumbnails and I allow the admin to edit the file name of each thumbnail. However, if an admin types in a file name that already exists, they are prompted to either "Replace" the image already there with this one or "Rename" this image to something else.

 

If they choose "Replace" then I have the system delete the existing image/content, and then move this image to this new name. After the postback the old thumbnail still remains, HOWEVER, if I do a "Ctrl-F5" then the correct image appears.

 

It looks the images are being cached (which is good) but is there a way I can disengage this caching when a new image is replacing an old image (with the same name) OR a way to force a complete refresh?

 

 

Thanks for your help...

Posted
After the update, try appending the image source with a random querystring like src="image.gif?date=" & now() IE will load a new image becuase it has never seen this path before.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...