Not clear what you mean by creating of a file path (please see my comment to the question). Probably you need to understand what a download is; you download a page whenever you want; it's downloaded location have nothing do to with the location on the server.
To do it, you need to use the class
System.Net.HttpWebRequest
. Please see:
http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.aspx[
^].
As the instance of
is created not by calling its constructor but using its parent class's factory method
System.Net.WebRequest.Create
, please see its description and the code sample:
http://msdn.microsoft.com/en-us/library/system.net.webrequest.aspx[
^].
This is some simple sample for file download:
http://social.msdn.microsoft.com/Forums/en-US/winappswithcsharp/thread/de96a61c-e089-4595-8349-612be5d23ee6/[
^].
The alternative, simplified method is the one using the class
System.Net.Http.HttpClient
:
http://code.msdn.microsoft.com/HttpClient-Downloading-to-4cc138fd[
^].
With
HttpWebRequest
, you have more control. In particular, you can continue downloaded partially downloaded file. When a file was partially downloaded, but the downloading was cancelled by whatever reason, you can start with the place of the cancellation, using already downloaded part. You can find my code in my application I provided for CodeProject users a while ago:
how to download a file from internet[
^].
—SA