About Webclient.DownloadData

dotnetgirl

Active member
Joined
Oct 14, 2003
Messages
26
Location
India
Hello EveryOne!

I am using Webclient.DownloadData method in my page to allow user to download a file. But its getting executed without doing anything!
Can anyone tell me what can be the problem?
This is to let the user to download .Msi file..
Reply soon.

Thanks!
 
My Code

Hello Robby!

i m making a delay in posting my code but i am still struck at the problem. It goes like this :

...
string fileName = "setup.msi";
string remUri = Server.Mappath("download\\");
string mypath;
WebClient wb = new WebClient();
mypath = remUri + fileName;

wb.DownloadFile(myPath, fileName);

...

i m getting no exception at DownloadFile call!

Whats the problem?

Thanks.
 
I am using this code to download a file from the internet, and it works fine:

[VB]
Dim wc As New System.Net.WebClient
wc.DownloadFile("http://www.interneturl.com", "C:\Local Path")[/VB]

As simple as that!
 
Thanks for reply!

i am done with the problem, but without using the Webclient class. i m just specifying the full url of my .Msi file that i want for download. On clicking the url , its opening dialog to open or save the file that is what i wanted to do.
 
Back
Top