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. Web Development
  3. ASP.NET
  4. Image refresh Problem

Image refresh Problem

Scheduled Pinned Locked Moved ASP.NET
helpdatabase
5 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.
  • S Offline
    S Offline
    sabby2006
    wrote on last edited by
    #1

    Hello All!! i am saving the logos of the companies in the a directory. the file name of the logo is kept as the id of the company in the db. my problem is that when i change the image(logo) the change is not reflected after the postback. i have to click refresh to see the change. I have clearing the cache at the same time redirecting to the same page also but it of no use. any help

    Regards

    V N 2 Replies Last reply
    0
    • S sabby2006

      Hello All!! i am saving the logos of the companies in the a directory. the file name of the logo is kept as the id of the company in the db. my problem is that when i change the image(logo) the change is not reflected after the postback. i have to click refresh to see the change. I have clearing the cache at the same time redirecting to the same page also but it of no use. any help

      Regards

      V Offline
      V Offline
      Vasudevan Deepak Kumar
      wrote on last edited by
      #2

      sabby2006 wrote:

      the change is not reflected after the postback. i have to click refresh to see the change

      Cache?

      Vasudevan Deepak Kumar Personal Homepage
      Tech Gossips
      Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.

      S 1 Reply Last reply
      0
      • V Vasudevan Deepak Kumar

        sabby2006 wrote:

        the change is not reflected after the postback. i have to click refresh to see the change

        Cache?

        Vasudevan Deepak Kumar Personal Homepage
        Tech Gossips
        Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.

        S Offline
        S Offline
        sabby2006
        wrote on last edited by
        #3

        Response.CacheControl = "no-cache";

        Regards

        1 Reply Last reply
        0
        • S sabby2006

          Hello All!! i am saving the logos of the companies in the a directory. the file name of the logo is kept as the id of the company in the db. my problem is that when i change the image(logo) the change is not reflected after the postback. i have to click refresh to see the change. I have clearing the cache at the same time redirecting to the same page also but it of no use. any help

          Regards

          N Offline
          N Offline
          N a v a n e e t h
          wrote on last edited by
          #4

          sabby2006 wrote:

          any help

          You can fool browser by adding some querystring to image URL, and browser thinks it's a new image and it will reload it. So your image URL will look like

          companylogo.jpg?foolBrowser=fooled

          Change this querystring value each time with a random generated value. So browser will think it's a new image and will be forced to reload.

          All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions

          S 1 Reply Last reply
          0
          • N N a v a n e e t h

            sabby2006 wrote:

            any help

            You can fool browser by adding some querystring to image URL, and browser thinks it's a new image and it will reload it. So your image URL will look like

            companylogo.jpg?foolBrowser=fooled

            Change this querystring value each time with a random generated value. So browser will think it's a new image and will be forced to reload.

            All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions

            S Offline
            S Offline
            sabby2006
            wrote on last edited by
            #5

            Thanks a lot it did the trick

            Regards

            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