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. Change photo option

Change photo option

Scheduled Pinned Locked Moved ASP.NET
sysadminhelptutorial
8 Posts 5 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
    SachinKumar M
    wrote on last edited by
    #1

    In my page i am having opton to show photo using asp image control and i am giving option to change photo. i am using file upload control and saving image in server. for change photo option after saving image into server photo is not refreshing. it is showing old photo only.. how to refersh image control to show new uploaded photo.. help me...

    P K L S 4 Replies Last reply
    0
    • S SachinKumar M

      In my page i am having opton to show photo using asp image control and i am giving option to change photo. i am using file upload control and saving image in server. for change photo option after saving image into server photo is not refreshing. it is showing old photo only.. how to refersh image control to show new uploaded photo.. help me...

      P Offline
      P Offline
      Paul Conrad
      wrote on last edited by
      #2

      SachinKumar M wrote:

      for change photo option after saving image into server photo is not refreshing. it is showing old photo only..

      Are you clearing the browser's cache?

      "The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham

      S 1 Reply Last reply
      0
      • S SachinKumar M

        In my page i am having opton to show photo using asp image control and i am giving option to change photo. i am using file upload control and saving image in server. for change photo option after saving image into server photo is not refreshing. it is showing old photo only.. how to refersh image control to show new uploaded photo.. help me...

        K Offline
        K Offline
        knbinoj58
        wrote on last edited by
        #3

        While setting url you may please pass one more time attribute to the url. Like the following imgPhoto.ImageUrl=string.Format("url?t={0}", DateTime.Now.Ticks.ToString()); I hope you can solve the problem in this way... regards, binoj

        1 Reply Last reply
        0
        • P Paul Conrad

          SachinKumar M wrote:

          for change photo option after saving image into server photo is not refreshing. it is showing old photo only..

          Are you clearing the browser's cache?

          "The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham

          S Offline
          S Offline
          SachinKumar M
          wrote on last edited by
          #4

          no i am not clearing browser's cache.. is it required to clear browser's cache. if yes tell me how to clear browsrs cache... Thank you..

          N 1 Reply Last reply
          0
          • S SachinKumar M

            no i am not clearing browser's cache.. is it required to clear browser's cache. if yes tell me how to clear browsrs cache... Thank you..

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

            SachinKumar M wrote:

            is it required to clear browser's cache.

            Problem is browser cache. But AFAIK, you can't clear it from the code. When you upload new image, just attach a timestamp or GUID with the URL. So browser will think it as a new URL as load again.

            Navaneeth How to use google | Ask smart questions

            1 Reply Last reply
            0
            • S SachinKumar M

              In my page i am having opton to show photo using asp image control and i am giving option to change photo. i am using file upload control and saving image in server. for change photo option after saving image into server photo is not refreshing. it is showing old photo only.. how to refersh image control to show new uploaded photo.. help me...

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              Give the new photo a different file name.

              1 Reply Last reply
              0
              • S SachinKumar M

                In my page i am having opton to show photo using asp image control and i am giving option to change photo. i am using file upload control and saving image in server. for change photo option after saving image into server photo is not refreshing. it is showing old photo only.. how to refersh image control to show new uploaded photo.. help me...

                S Offline
                S Offline
                SachinKumar M
                wrote on last edited by
                #7

                My problem solved after appending DateTime.Now.Ticks to my ImageUrl. thank you all..

                P 1 Reply Last reply
                0
                • S SachinKumar M

                  My problem solved after appending DateTime.Now.Ticks to my ImageUrl. thank you all..

                  P Offline
                  P Offline
                  Paul Conrad
                  wrote on last edited by
                  #8

                  Cool. Glad to hear you solve it :)

                  "The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham

                  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