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. Refreshing.

Refreshing.

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netgraphicshelpquestion
4 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.
  • R Offline
    R Offline
    Ranger49
    wrote on last edited by
    #1

    Hello! I just uploaded my first ASP.NET 2.0 application to my new webhosting provider. At the moment I have a fractal drawing program on it. This code worked perfectly on my PC with Web Developer. Unfortunately, on my site it doesn't work, because when you want to draw a second picture you need to refresh the screen with the browser to get to see the new picture. This picture is stored in a bmp file in my root directory. I looked at a Refresh() method, but this method is in System.Windows.Forms which isn't available in Web Developer. Can anybody tell me where to search to find an answer to this problem? Do I need to add a statement to the Page_Load method maybe? Ranger. Novice.

    K G 2 Replies Last reply
    0
    • R Ranger49

      Hello! I just uploaded my first ASP.NET 2.0 application to my new webhosting provider. At the moment I have a fractal drawing program on it. This code worked perfectly on my PC with Web Developer. Unfortunately, on my site it doesn't work, because when you want to draw a second picture you need to refresh the screen with the browser to get to see the new picture. This picture is stored in a bmp file in my root directory. I looked at a Refresh() method, but this method is in System.Windows.Forms which isn't available in Web Developer. Can anybody tell me where to search to find an answer to this problem? Do I need to add a statement to the Page_Load method maybe? Ranger. Novice.

      K Offline
      K Offline
      kubben
      wrote on last edited by
      #2

      I have seen an issue where if you reuse the same name in the bmp file there is a caching problem. If you are doing this, you have two options. First you can choose a new name for the bmp file each time. Second you can force garbage collection which seems to help. Hope that helps. Ben

      1 Reply Last reply
      0
      • R Ranger49

        Hello! I just uploaded my first ASP.NET 2.0 application to my new webhosting provider. At the moment I have a fractal drawing program on it. This code worked perfectly on my PC with Web Developer. Unfortunately, on my site it doesn't work, because when you want to draw a second picture you need to refresh the screen with the browser to get to see the new picture. This picture is stored in a bmp file in my root directory. I looked at a Refresh() method, but this method is in System.Windows.Forms which isn't available in Web Developer. Can anybody tell me where to search to find an answer to this problem? Do I need to add a statement to the Page_Load method maybe? Ranger. Novice.

        G Offline
        G Offline
        Guffa
        wrote on last edited by
        #3

        The image is cached by the browser. Add a unique value as a querystring to the image to make it unique. Example: You can use a large random number as a "unique" number. The risk that you hit the same number twice is so small that you can disregard it.

        --- single minded; short sighted; long gone;

        R 1 Reply Last reply
        0
        • G Guffa

          The image is cached by the browser. Add a unique value as a querystring to the image to make it unique. Example: You can use a large random number as a "unique" number. The risk that you hit the same number twice is so small that you can disregard it.

          --- single minded; short sighted; long gone;

          R Offline
          R Offline
          Ranger49
          wrote on last edited by
          #4

          Guffa wrote:

          The image is cached by the browser.

          I tried this, and I am sure it will solve my problem, but that I now encountered the problem that I couldn't figure out how to set outputPicture.ImageUrl to some value. Somehow the Url for this picture kept resetting to an empty string. Could someone say anything sensible about this? Ranger. Novice

          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