Sunday, September 9, 2012

Multiple File Upload in ASP.NET 4.5

ASP.NET 4.5 has come with very nice feature and one of the new feature is uploading of multiple files at one instant.So, let's move forward and get overview of this new feature.

Simply drap and drop the FileUpload tool in design view

  <asp:FileUpload ID="FileUpload1" runat="server" AllowMultiple="true"/>

You will see new property has been added to FileUpload control named as 'AllowMultiple'.
Simply set this property to TRUE to enable the multiple file upload feature.

Let's move forward to view some code
I have added fileupload control and one button to view the names of file uploaded as well as save those files in some desired location.

HTML code

Code Behind File

Hope you have learnt one more new feature of ASP.NET 4.5.
In case of any questions, please get back to me.

Till the time enjoy life and coding !!






No comments:

Post a Comment