Skip to main content

Posts

Showing posts with the label Upload Multiple Files

Upload Multiple Files Using FileUpload Control In ASP.NET 4.5 +

ASP.NET 4.5 and upper versions support this feature. Now, FileUpload  control is built to support HTML 5, therefore it is only supported in browsers supporting HTML5. For other browsers it will work like a normal file upload control in ASP.NET. A new Attribute introduces with the ASP.NET 4.5 FileUplaod control i.e.  AllowMultiple ,  It takes either true or false. In order to support multiple file uploads, set AllowMulitple =" true " other than false. < asp:FileUpload   runat = "server"   ID = "UploadImages"   AllowMultiple = "true"  /> In addition to this control, some new properties have been included to support code-behind coding. HasFiles Check whether FileUpload control has multiple files or not. PostedFiles Basically used to get all the files from the FileUpload control in the iteration. Example code to upload files:    < asp:FileUpload runat ="server" ID ="UploadImages" AllowMultiple ="t...