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. download a file in a background without Save As

download a file in a background without Save As

Scheduled Pinned Locked Moved ASP.NET
comcsharpasp-netsysadminwindows-admin
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.
  • S Offline
    S Offline
    sunilj20
    wrote on last edited by
    #1

    Hello all .NET Stalwarts, I need your help in this teaser ... I have a requirement wherein, a user clicks on a file name in an ASP.NET web application, and the file should automatically be downloaded (Without showing the "Open", "Save As") in the local machine at a pre defined path (path defined in the registry), and launch the file in its associated application. I think this can be done through ActiveX Controls, but i dont know how to create ActiveX controls in .NET?? I have the code to download files from the server using the Web Client, and HTTPResponse things in .NET, but i dont know how will i use that in a web page as that would download the file on the server, and not on the client machine. Can anyone give me any suggestions as to how one can achieve this?? Thanks in advance for help -- Regards Sunil J (sunilj20@gmail.com)

    R V 2 Replies Last reply
    0
    • S sunilj20

      Hello all .NET Stalwarts, I need your help in this teaser ... I have a requirement wherein, a user clicks on a file name in an ASP.NET web application, and the file should automatically be downloaded (Without showing the "Open", "Save As") in the local machine at a pre defined path (path defined in the registry), and launch the file in its associated application. I think this can be done through ActiveX Controls, but i dont know how to create ActiveX controls in .NET?? I have the code to download files from the server using the Web Client, and HTTPResponse things in .NET, but i dont know how will i use that in a web page as that would download the file on the server, and not on the client machine. Can anyone give me any suggestions as to how one can achieve this?? Thanks in advance for help -- Regards Sunil J (sunilj20@gmail.com)

      R Offline
      R Offline
      richmondwill
      wrote on last edited by
      #2

      Sunil, No browser will allow files to be downloaded and launched without a prompt. That is a good thing. Imagine the abuses... Cheers, Will

      S 1 Reply Last reply
      0
      • R richmondwill

        Sunil, No browser will allow files to be downloaded and launched without a prompt. That is a good thing. Imagine the abuses... Cheers, Will

        S Offline
        S Offline
        sunilj20
        wrote on last edited by
        #3

        Will I agree your point, but .... in my requirement, the user clicks on the file and expects it to open in its associated desktop application. This is the case where the user himself is allowing the file to be downloaded on his machine. Now it would be stupid to ask him or direct him to save the file in the local file store (in the "Open" or "Save As"). I do not think this particular thing comes under "Abuse" Cheers Sunil

        1 Reply Last reply
        0
        • S sunilj20

          Hello all .NET Stalwarts, I need your help in this teaser ... I have a requirement wherein, a user clicks on a file name in an ASP.NET web application, and the file should automatically be downloaded (Without showing the "Open", "Save As") in the local machine at a pre defined path (path defined in the registry), and launch the file in its associated application. I think this can be done through ActiveX Controls, but i dont know how to create ActiveX controls in .NET?? I have the code to download files from the server using the Web Client, and HTTPResponse things in .NET, but i dont know how will i use that in a web page as that would download the file on the server, and not on the client machine. Can anyone give me any suggestions as to how one can achieve this?? Thanks in advance for help -- Regards Sunil J (sunilj20@gmail.com)

          V Offline
          V Offline
          V 0
          wrote on last edited by
          #4

          if the browser is a component of your thick client, you can catch the url clicked analyze the parameters and do stuff. eg. url is server/dir/yourpage.aspx?saveas=somepath your thick client catches the url, sees the saveas parameter and the somepath value and saves what you like to disk. So it would be possible if your browser is a component of the desktop application you spoke of. I don't know how to do it myself, but you'll probably find more info on MSDN. good luck. No hurries, no worries.

          S 1 Reply Last reply
          0
          • V V 0

            if the browser is a component of your thick client, you can catch the url clicked analyze the parameters and do stuff. eg. url is server/dir/yourpage.aspx?saveas=somepath your thick client catches the url, sees the saveas parameter and the somepath value and saves what you like to disk. So it would be possible if your browser is a component of the desktop application you spoke of. I don't know how to do it myself, but you'll probably find more info on MSDN. good luck. No hurries, no worries.

            S Offline
            S Offline
            sunilj20
            wrote on last edited by
            #5

            Hi V, Well the browser is not a part of the application. There are two things here, one is the browser based web application and another is the desktop application. I have figured out the downloading part using Web Client, now how to launch a dersktop application from IE is my doubt. Cheers Sunil

            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