Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Image Update Problem

Image Update Problem

Scheduled Pinned Locked Moved Visual Basic
sysadminhelpquestionannouncement
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dasumohan
    wrote on last edited by
    #1

    Hi, I have an image, file upload and a button control on my webform. I am uploading a new image and attaching the image to replace my existing image in button click event. It seems to work fine on my local machine. When I deploy and run on the server side, the image upload is working fine, the image is getting replaced in the background. However my web page still shows old image. If I reload the page then it shows the updated image. I am using the same name for the image when I am doing save as in the button click event. Any inputs why this is happening? Appreciate inputs Raj D

    Raj D

    J D 2 Replies Last reply
    0
    • D dasumohan

      Hi, I have an image, file upload and a button control on my webform. I am uploading a new image and attaching the image to replace my existing image in button click event. It seems to work fine on my local machine. When I deploy and run on the server side, the image upload is working fine, the image is getting replaced in the background. However my web page still shows old image. If I reload the page then it shows the updated image. I am using the same name for the image when I am doing save as in the button click event. Any inputs why this is happening? Appreciate inputs Raj D

      Raj D

      J Offline
      J Offline
      JUNEYT
      wrote on last edited by
      #2

      dasumohan wrote:

      If I reload the page then it shows the updated image

      Because you are manually refresing the web page. For example, if you had a function in your script block to refresh the images in every 15 seconds in the web page, you wouldn't have to refresh the whole page to see if the uploaded images sucessfully replaced. Just an idea... :wtf:

      What a curious mind needs to discover knowledge is noting else than a pin-hole.

      1 Reply Last reply
      0
      • D dasumohan

        Hi, I have an image, file upload and a button control on my webform. I am uploading a new image and attaching the image to replace my existing image in button click event. It seems to work fine on my local machine. When I deploy and run on the server side, the image upload is working fine, the image is getting replaced in the background. However my web page still shows old image. If I reload the page then it shows the updated image. I am using the same name for the image when I am doing save as in the button click event. Any inputs why this is happening? Appreciate inputs Raj D

        Raj D

        D Offline
        D Offline
        Dave Kreskowiak
        wrote on last edited by
        #3

        dasumohan wrote:

        However my web page still shows old image.

        Because the browser has cached the page and your seeing that cached page. You have to set metatag information telling the browser to not cache the page or shorten the time that the cached page is valid. I have no idea how to do it because I don't do that much web developement. Your best bet is to ask in the ASP.NET Forum.

        Dave Kreskowiak Microsoft MVP - Visual Basic

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups