By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,424 Members | 1,391 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,424 IT Pros & Developers. It's quick & easy.

download a file in a background without Save As

P: n/a
Neo
Hello,

I have a requirement wherein, a user clicks on a file name in a
ASP.NET web application, and the file should automatically be
downloaded in the local machine at a pre defined path (path defined in
the registry), and open 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??

Can anyone give me any suggestions as to how one can achieve this??

Thanks in advance for help

Cheers

Sunil
Nov 16 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Neo,

You can't create ActiveX controls in .NET (well, you can, but the method
is unsupported, and I wouldn't recommend it).

You can run a .NET control in internet explorer, and then have that
perform the download. However, when you run .NET controls in IE, the setup
for such controls needs to elevate the permissions for that control.

For more information on how to host a control in IE, check out the
article titled "Using Windows Forms Controls in Internet Explorer" on the
gotdotnet site, located at (watch for line wrap):

http://samples.gotdotnet.com/quickst...eSourcing.aspx

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Neo" <su******@msn.com> wrote in message
news:f8**************************@posting.google.c om...
Hello,

I have a requirement wherein, a user clicks on a file name in a
ASP.NET web application, and the file should automatically be
downloaded in the local machine at a pre defined path (path defined in
the registry), and open 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??

Can anyone give me any suggestions as to how one can achieve this??

Thanks in advance for help

Cheers

Sunil

Nov 16 '05 #2

P: n/a
Hello Nic,

Thanks for the speedy reply.

My doubt is like in Windows form, i can access the registry of the
machine where the application is running and get the file store path
from the registry. Whereas In case of using windows form controls in IE
(.NET Control), can i access the the target machine registry??

I am not sure i can do that even if there are lowest possible
permissions applied in that machine.

I will look at that article and try somethings out.
Thanks for the same.

I have created a stand alone Windows application do the things which i
said in my previous mail, is that possible from a Web control is my
Question?

Any more suggestions in getting the thing solved, are more than
appreciated. Thanks once again

Cheers

Sunil Jambekar

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #3

P: n/a
Sunil,

Chances are you will not be granted the right to access the registry.
In order to embed a .NET control in IE, you will have to set the security
permissions on the machine that is installing it. If you don't have control
over the machines in the environment this will run, then this probably isn't
the best solution for you and you should resort to an ActiveX control using
unmanaged code.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Sunil J" <su******@gmail.com> wrote in message
news:us**************@TK2MSFTNGP12.phx.gbl...
Hello Nic,

Thanks for the speedy reply.

My doubt is like in Windows form, i can access the registry of the
machine where the application is running and get the file store path
from the registry. Whereas In case of using windows form controls in IE
(.NET Control), can i access the the target machine registry??

I am not sure i can do that even if there are lowest possible
permissions applied in that machine.

I will look at that article and try somethings out.
Thanks for the same.

I have created a stand alone Windows application do the things which i
said in my previous mail, is that possible from a Web control is my
Question?

Any more suggestions in getting the thing solved, are more than
appreciated. Thanks once again

Cheers

Sunil Jambekar

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 16 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.