This Code is usable when u know the
achual path of client file and you want to get (save and upload) that
file in your server computer or you want to upload file through a path
that client type in a textbox not using file upload.
WebClient client= new
WebClient();
string FileName = Path.GetFileName(FullFilePath);
Byte[] bytes =
client.DownloadData(FullFileName);
if (bytes.Length > 0)
{
client.DownloadFile(FullFilePath,
Server.MapPath("File/" +
FileName));
}
No comments:
Post a Comment