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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. File Download Response.....

File Download Response.....

Scheduled Pinned Locked Moved ASP.NET
questionsysadmin
3 Posts 2 Posters 1 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.
  • N Offline
    N Offline
    Neo78692
    wrote on last edited by
    #1

    Hi guys, I have used following code Response.AppendHeader( "content-disposition", "attachment;filename=" + FilePath ); Response.WriteFile(FilePath); Response.End(); to get the download dialog box for one file on my server. Can any body tell me how can i get the response (Whether user has clicked Open, Save or Cancel button)??? Thanks in Advance

    J 1 Reply Last reply
    0
    • N Neo78692

      Hi guys, I have used following code Response.AppendHeader( "content-disposition", "attachment;filename=" + FilePath ); Response.WriteFile(FilePath); Response.End(); to get the download dialog box for one file on my server. Can any body tell me how can i get the response (Whether user has clicked Open, Save or Cancel button)??? Thanks in Advance

      J Offline
      J Offline
      Jim Conigliaro
      wrote on last edited by
      #2

      I don't believe that you can. Thie "open/save/cancel" options are handled entirely within the browser and do not send any data to the browser. The job of the server is simly to send the stream to the client and be done with it. The browser is responsible for receiving the stream and then asking the user what to do with it, which requires no server interaction.

      Jim Conigliaro jconigliaro@ieee.org
      http://www.jimconigliaro.com

      N 1 Reply Last reply
      0
      • J Jim Conigliaro

        I don't believe that you can. Thie "open/save/cancel" options are handled entirely within the browser and do not send any data to the browser. The job of the server is simly to send the stream to the client and be done with it. The browser is responsible for receiving the stream and then asking the user what to do with it, which requires no server interaction.

        Jim Conigliaro jconigliaro@ieee.org
        http://www.jimconigliaro.com

        N Offline
        N Offline
        Neo78692
        wrote on last edited by
        #3

        Thanks Jim, Is there any way to do same functionality?

        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