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. Downloading Image

Downloading Image

Scheduled Pinned Locked Moved ASP.NET
sysadminquestion
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.
  • M Offline
    M Offline
    Marek Konieczny
    wrote on last edited by
    #1

    I am generating a high resoulution image on the web server, which should be afterward downloaded onto users machine without displaying it in the browser and requiring user to make a right click and choosing "Save image as..." What would be the best aproach to do it? Sincerely Marek

    I 1 Reply Last reply
    0
    • M Marek Konieczny

      I am generating a high resoulution image on the web server, which should be afterward downloaded onto users machine without displaying it in the browser and requiring user to make a right click and choosing "Save image as..." What would be the best aproach to do it? Sincerely Marek

      I Offline
      I Offline
      iamrashida83
      wrote on last edited by
      #2

      use this: suppose ur image is at http://www.abc.com/images/my\_image.gif or C:\images\my_image.gif use a link or link button with image url like: function Message() { alert('Right click on link and save...'); return false; } Download Image Here

      Regards, Rashida Jabeen http://www.akaas.net[^]

      I M 2 Replies Last reply
      0
      • I iamrashida83

        use this: suppose ur image is at http://www.abc.com/images/my\_image.gif or C:\images\my_image.gif use a link or link button with image url like: function Message() { alert('Right click on link and save...'); return false; } Download Image Here

        Regards, Rashida Jabeen http://www.akaas.net[^]

        I Offline
        I Offline
        iamrashida83
        wrote on last edited by
        #3

        i think my html code is not showing properly it is: function Message() { alert('Right click on link and save...'); return false; } <Download Image Here< replace < with single

        Regards, Rashida Jabeen http://www.akaas.net[^]

        1 Reply Last reply
        0
        • I iamrashida83

          use this: suppose ur image is at http://www.abc.com/images/my\_image.gif or C:\images\my_image.gif use a link or link button with image url like: function Message() { alert('Right click on link and save...'); return false; } Download Image Here

          Regards, Rashida Jabeen http://www.akaas.net[^]

          M Offline
          M Offline
          Marek Konieczny
          wrote on last edited by
          #4

          Thanks for help, but I actually do not want any user interaction, except for specifying name for data. When I make response.redirect("myzipfile.zip") and point to a zip file, the dialog for saving data locally appears. This ist what I want to see when I redirect to an image file, istead of displaying it. Marek

          M 1 Reply Last reply
          0
          • M Marek Konieczny

            Thanks for help, but I actually do not want any user interaction, except for specifying name for data. When I make response.redirect("myzipfile.zip") and point to a zip file, the dialog for saving data locally appears. This ist what I want to see when I redirect to an image file, istead of displaying it. Marek

            M Offline
            M Offline
            minhpc_bk
            wrote on last edited by
            #5

            Hi there, To force the Save As dialog box at the client side, you can use the Content-Disposition header field to send the image data from the server to the client side. You can simply google for "ASP.NET Content-Disposition " to get more info.

            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