Problem in Uploading Files
C#
1
Posts
1
Posters
0
Views
1
Watching
-
I want to Upload a file. Here is my code.. Page 1: WebClient client = new WebClient(); client.UploadFile( "http://ft-rt-005/test/upload1.aspx","POST","G:\\\\Water lilies.jpg"); Page 2: foreach(string f in Request.Files.AllKeys) { HttpPostedFile file = Request.Files[f]; file.SaveAs(Server.MapPath(".\\upload\\"+ file.FileName)); } I am uploading a file to Page 2 using client.UploadFile().From Page 2 ,i am saving to the server.But whenever client.UploadFile() is invoked,my application searches the file in server.It is not searching in the client machine. I want to upload from the client machine.Can anybody help me.. Thanks Ramesh