Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hello EveryOne!

 

I am using 'Webclient.DownloadData' method in my page to allow user to download a file. But it's 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!

Posted

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!

 

What's the problem?

 

Thanks.

Posted

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

 

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

 

As simple as that!

Posted

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 , it's opening dialog to open or save the file that is what i wanted to do.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...