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>