asp.net multiple file upload code (full instance) (1/2)

Source: Internet
Author: User
Tags file upload

Here we provide an ASP tutorial. NET multiple File upload code (full example) Oh, and this is a browser-compatible file upload code OH.

Web page Special effects code

<script type= "text/web Effects" >
var attachname = "UploadFile";
var i = 1;
function Addinput () {
if (i > 0) {
var attach = Attachname + i;
if (Createinput (attach))
i = i + 1;
}
}
function Deleteinput () {
if (i > 1) {
i = i-1;
if (!removeinput ())
i = i + 1;
}
}
function Createinput (nm) {
var aelement = document.createelement ("input");
Aelement.name = NM;
Aelement.id = NM;
Aelement.type = "File";
Aelement.size = "50";
if (document.getElementById ("Upload"). AppendChild (aelement) = = null)
return false;
return true;
}
function Removeinput (nm) {
var aelement = document.getElementById ("Upload");
if (Aelement.removechild (aelement.lastchild) = null)
return false;
return true;
}
</script>

asp.net tutorial files

<div style= "Text-align:center" >
<div style= "width:200px;" >
<input type= "File" size= "a" name= "file"/>
<span id= "Upload" ></span>
<br/>
<input type= "button" name= "button" value= "Add File" onclick= "Addinput ()" >
<input type= "button" name= "button" value= "Delete file" onclick= "Deleteinput ()" >
</div>
<div style= "margin:10px 0 10px 0;width:200px;" >
<asp:button runat= "Server" text= "upload" id= "btnupload" onclick= "Btnupload_click" ></asp:button><br/>
<asp:label id= "strstatus" runat= "Server" ></asp:label>
</div>
</div>

Home 1 2 last page
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.