myWebClient.DownloadFile Question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dave

    myWebClient.DownloadFile Question

    I'm trying to download a file from the Web Server to the user's
    desktop using myWebClient.Dow nloadFile as described by Microsoft at
    http://msdn.microsoft.com/en-us/library/ez801hhe.aspx.

    2 Questions:

    1.) Is this the best approach?
    2.) Is there a way to have the default download location as the
    User's Desktop?

    Thanks
  • =?Utf-8?B?RmFtaWx5IFRyZWUgTWlrZQ==?=

    #2
    RE: myWebClient.Dow nloadFile Question

    The second argument to DownloadFile is the local destination, which can be a
    full path. In the example they only specified a file in the working
    directory. You should specify a file using
    Environment.Get FolderPath(Envi ronment.Special Folder.Desktop) , as part of the
    full path.

    To answer question 1, it is certainly the simplest to impliment.

    "Dave" wrote:
    I'm trying to download a file from the Web Server to the user's
    desktop using myWebClient.Dow nloadFile as described by Microsoft at
    http://msdn.microsoft.com/en-us/library/ez801hhe.aspx.
    >
    2 Questions:
    >
    1.) Is this the best approach?
    2.) Is there a way to have the default download location as the
    User's Desktop?
    >
    Thanks
    >

    Comment

    Working...