Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8358407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T10:47:08+00:00 2026-06-09T10:47:08+00:00

I have 30 images and next to them there is a upload button. When

  • 0

I have 30 images and next to them there is a upload button.

When you select new image and press update, it should delete the old image and save the new image with the same name and path.

I do this with:

string path = "~/Pics/Image1.jpg";
System.IO.File.Delete(Server.MapPath(path));
uploadfile.SaveAs(path);

It works,i can see the change in my folder where i keep all of my images, but in the browser i see the old image and i need to delete my cache in order to see the new image.

Is there any way i can update my images and show the new images without deleting cache from the browser?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T10:47:10+00:00Added an answer on June 9, 2026 at 10:47 am

    This is a browser caching issue as you suspect. What you can do is add a query string value or something along those lines so that the browser will have to reload the file.

    The end result would be image.jpg?image=randomNumber

    I usually do this through javascript and you can use generating-random-numbers-in-javascript-in-a-specific-range to help you figure that out.

    Now just as a note you are only adding the querystring to the source of the image tag just in case I was not clear.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the next issues, xcode cannot find one image but there are in
I have a sprite sheet and I want to display images next to each
I have a transparent rectangle on a picture box,if i click next,the next image
I have text next to a image (red square for now). When i make
I have CheckedListBox, now i want to put image from the ImageList next to
I have images on iCloud and I subclassed UIDocument for them. Now i want
I have a panel that fades images in and out. However, the first image
Does jq.carousel support dynamically added images? I have 'some' button, o I have a
I have found a suitable way to let user bulk upload images http://www.plupload.com/index.php After
I have a macro that imports images from a directory and places them in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.