ASP. NET uploads multiple files at the same time, and does not use the htmlfileinput upload method (resource about File Upload)

Source: Internet
Author: User
Tags rfc

There are many feasible solutions for uploading multiple files at the same time, as shown below:

 

Multipowupload
Http://www.element-it.com/MultiPowUpload.aspx
 
Jquery Multiple File Upload plugin
Http://www.fyneworks.com/jquery/multiple-file-upload/
 
Allowing users to upload multiple files at once
Http://www.dotnetjunkies.com/Tutorial/81E0C3A9-1B40-425C-B150-B578FE724A39.dcik
 
Uploading files using the file field control
Http://msdn.microsoft.com/en-us/library/aa478971.aspx
 
Upload multiple files Hotmail Style
Http://www.codeproject.com/KB/aspnet/multiuploads.aspx

 

However, almost all file uploads are implemented through the htmlfileinput control, because htmlfileinput is the only control specified by RFC 1867.

(RFC 1867 form-based file upload in HTMLHttp://www.ietf.org/rfc/rfc1867.txt)

 

Some strange customers do not know why, they must use a non-htmlfileinput control to upload. In this case, the following method can be used:

 

    1. First use FileSystemObject OrXMLHTTPRequest object reads the file to be uploaded in binary form into a javascript variable (For details, refer to the http://www.javascripter.net/faq/reading2.htm)
    2. Assign the value of this JavaScript variable to the hiddenfield of <input type = "hidden" runat = "server"/>.
    3. Since this hiddenfield is runat = server, it is not difficult to get it to the server, and use system. Io to save it as a file format.

This completes the upload.

 

However, there are still many problems with this method, especially the permission of FSO. the user will not let you read his file system at will, but it is helpless. It can only be regarded as a method.

 

Currently, it is still the most practical to use ActiveX controls for HTTP uploads. Unfortunately, I will not. I will try again later.

 

 

Sincerely,
Lance Zhang
Microsoft online community support

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.