Home > DeveloperSection > Forums > Difference in ASP.NET file uploading functions
Manoj Bhatt
Manoj Bhatt

Total Post:153

Points:1079
Posted on    August-22-2014 1:02 AM

 C# C# 
Ratings:


 1 Reply(s)
 547  View(s)
Rate this:

I am learning how to upload a file to a server in C# ASP.NET.

What is the difference between these 2 functions:

element.PostedFile.SaveAs();

WebClient's wc.UploadFile();



Sumit Kesarwani

Total Post:378

Points:2694
Posted on    August-22-2014 2:00 AM

Hi Manoj, 

They are extremely different.

HttpPostedFile represents a file that has been sent to your server from a client.

WebClient.UploadFile() allows you to send a file to an arbitrary server from your client.


Don't want to miss updates? Please click the below button!

Follow MindStick