download a file in a background without Save As
-
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)
-
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)
Sunil, No browser will allow files to be downloaded and launched without a prompt. That is a good thing. Imagine the abuses... Cheers, Will
-
Sunil, No browser will allow files to be downloaded and launched without a prompt. That is a good thing. Imagine the abuses... Cheers, Will
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
-
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)
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.
-
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.
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