HttpContext.Current.Request.Files

Source: Internet
Author: User

httpfilecollection files = HttpContext.Current.Request.Files;

If files return results are always incorrect

WORKAROUND: You must add the Name property to the file control

<script type= "Text/javascript" >
function AddFile () {
var str = ' <div class= "R_c_column" ><div class= "R_c_left" > Please select Picture: </div><div class= "R_c_right" > <input type=file name=file runat=server style=width:300px/></div></div> ';
document.getElementById (' FileList '). insertAdjacentHTML ("BeforeEnd", str);
$ ("#FileList"). html (str);
}
</script>
document.getElementById (' FileList '). insertAdjacentHTML ("BeforeEnd", str):

Adding HTML content and text content before using the innerHTML and InnerText methods, and recently found insertAdjacentHTML and insertAdjacentText methods, both of which are more flexible, You can insert HTML content and text content in the specified place.
1. Beforebegin: Insert before the label starts

2. Afterbegin: After inserting the tag start tag

3. BeforeEnd: Before the tag end tag

4. Afterend: After inserting the tag end tag

HttpContext.Current.Request.Files

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.