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. help with download files

help with download files

Scheduled Pinned Locked Moved ASP.NET
helpsysadmin
6 Posts 2 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
    David Flores
    wrote on last edited by
    #1

    Currently i have a couple files on the web site, if a user clicks a link point to the file on the server, the typical gray box asking to open or run pops up. Great. Well now I am removing the links and replacing it with a call to a web service. I have no problem getting the files from the webservice. My problem is giving the user a way to pick a location to save the file. I would like the standard windows SaveAs dialog to popup (instead of the Open dialog box like when using a input control). Any help would be appriecated. Thanks David

    J 1 Reply Last reply
    0
    • D David Flores

      Currently i have a couple files on the web site, if a user clicks a link point to the file on the server, the typical gray box asking to open or run pops up. Great. Well now I am removing the links and replacing it with a call to a web service. I have no problem getting the files from the webservice. My problem is giving the user a way to pick a location to save the file. I would like the standard windows SaveAs dialog to popup (instead of the Open dialog box like when using a input control). Any help would be appriecated. Thanks David

      J Offline
      J Offline
      jon vickers
      wrote on last edited by
      #2

      Could you clarify this part: David Flores wrote: (instead of the Open dialog box like when using a input control). Thanks, Jon Vickers

      D 1 Reply Last reply
      0
      • J jon vickers

        Could you clarify this part: David Flores wrote: (instead of the Open dialog box like when using a input control). Thanks, Jon Vickers

        D Offline
        D Offline
        David Flores
        wrote on last edited by
        #3

        When you click the browse button of a html input control, the standard file open dialog popups up for you to select a file when you are trying to upload a file. i want the reverse. i want the file save version of the dialog box.

        J 1 Reply Last reply
        0
        • D David Flores

          When you click the browse button of a html input control, the standard file open dialog popups up for you to select a file when you are trying to upload a file. i want the reverse. i want the file save version of the dialog box.

          J Offline
          J Offline
          jon vickers
          wrote on last edited by
          #4

          Isn't that what it does already. You click on the file, then click "Save As" and the file save dialog box opens to browse and save the file? Thanks, Jon Vickers

          D 1 Reply Last reply
          0
          • J jon vickers

            Isn't that what it does already. You click on the file, then click "Save As" and the file save dialog box opens to browse and save the file? Thanks, Jon Vickers

            D Offline
            D Offline
            David Flores
            wrote on last edited by
            #5

            For the html input control its a "Open" dialog box. When clicking on a link to download a file, yes a "Save as" dialog opens up but I want to be able to popup the save as dialog box automatically, at any time. the reason is i am recieving a memory stream from a webservice which i then need to write to the clients computer, but i need the client to pick a place to save it...that is where the popuping up the save as dialog box comes in. hope i am not too confusing

            J 1 Reply Last reply
            0
            • D David Flores

              For the html input control its a "Open" dialog box. When clicking on a link to download a file, yes a "Save as" dialog opens up but I want to be able to popup the save as dialog box automatically, at any time. the reason is i am recieving a memory stream from a webservice which i then need to write to the clients computer, but i need the client to pick a place to save it...that is where the popuping up the save as dialog box comes in. hope i am not too confusing

              J Offline
              J Offline
              jon vickers
              wrote on last edited by
              #6

              I think I know what you are talking about. You don't want them to click a link, the file just starts coming down? Depending on your page/site design you may have to use some sort of javascript to control "popup at any time". But, as far, as I can tell what you are talking about, you need to create an aspx page that does a response.binary write to the browser. You will have to search around as there are some headers that need to be set. Such as: file size, mime type, etc. But I have done this many times to binary write pdf and jpg files directly from an aspx page. I can't find any code at the moment but there are many examples out there. Thanks, Jon Vickers

              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