ASP.NET

ASP.NET - File Uploading

ASP.NET - File Uploading

ASP.NET has two controls to upload files to the webserver.  

  • HTMLInputFile
  • FileUpload

Syntax of File upload :

<asp:FileUpload ID= "Uploadfile1" runat = "server" />

Properties

  • FileBytes – Returns an array of bytes in a file that has to be uploaded
  • FileContent – This returns streams of the object to the file to be uploaded
  • FileName – this returns name of the file to be uploaded
  • HasFile – specifies control has the file to upload
  • PostedFile –returns the reference of an uploaded file