<!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><%@ Page Language="C#" AutoEventWireup="true" CodeFile="MultiFileUpload.aspx.cs"
Inherits="MultiFileUpload" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>孟宪会多文件上传测试</title>
<script type="text/javascript">
function addFile() {
var div = document.createElement("div");
var f = document.createElement("input");
f.setAttribute("type", "file")
f.setAttribute("name", "File")
f.setAttribute("size", "50")
div.appendChild(f)
var d = document.createElement("input");
d.setAttribute("type", "button")
d.setAttribute("onclick", "deteFile(this)");
d.setAttribute("value", "移除")
div.appendChild(d)
document.getElementById("_container").appendChild(div);
}
function deteFile(o) {
while (o.tagName != "DIV") o = o.parentNode;
o.parentNode.removeChild(o);
}
</script>
</head>
<body>
<form id="form1" runat="server" method="post" enctype="multipart/form-data">
<h3>多文件上传</h3>
用户名:<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<div id="_container">
<input type="file" size="50" name="File" />
</div>
<div>
<input type="button" value="添加文件(Add)" onclick="addFile()" />
</div>
<div style="padding:10px 0">
<asp:Button runat="server" Text="开始上传" ID="UploadButton"
onclick="UploadButton_Click"></asp:Button>
</div>
<div>
<asp:Label ID="strStatus" runat="server" Font-Names="宋体" Font-Bold="True" Font-Size="9pt"
Width="500px" BorderStyle="None" BorderColor="White"></asp:Label>
</div>
</form>
</body>
</html>
相关推荐
在ASP.NET中实现多文件上传
在ASP.NET中实现多文件上传的简单代码实现,可供参考。
一个简单的ASP.NET实现多文件上传代码
asp.net+ajax 实现的多文件上传, 支持文件单独和批量上传,单个和批量移除
ASP.NET WebAPI 接口 实现单文件,多文件上传下载,图片缩略图访问实现接口,实用于APP,web系统应用,上传下载文件、图片访问分离处理。
在 Asp.net Mvc 中,文件上传可以通过多种方式实现。第一种方式是使用 HTML 的 form 标签,设置 enctype 属性为 "multipart/form-data",然后使用 input 标签的 type 属性设置为 "file"。例如: ...
ASP.NET Web API File Upload and Multipart MIME
在本文中,我们使用ASP.NET缓存机制来实现文件上传进度条的显示。ASP.NET缓存机制能够帮助我们缓存文件上传的信息,从而实现进度条的显示。在本文中,我们使用ASP.NET缓存机制来缓存文件上传的信息,然后使用ajax...
asp.net实现单文件上传,源代码,可实现单一的文件上传
Uploadify 是一个非常好的jQuery文件上传插件,可以实现无刷新多文件上传,带进度显示,基于Flash与Ajax技术。我在Firefox 4.0.1 和 IE 9.0.8112 浏览器中使用,兼容性良好。使用许可是 MIT,免费开源且可自由地用于...
基于jquery.form插件写的ASP.NET文件批量上传。
asp.net上传 多文件上传 批量上传 上传代码 上载asp.net上传 多文件上传 批量上传 上传代码 上载asp.net上传 多文件上传 批量上传 上传代码 上载asp.net上传 多文件上传 批量上传 上传代码 上载asp.net上传 多文件...
asp.net自定义固定格式多文件批量上传
ASP.NET多文件上传 ASP.NET多文件上传 ASP.NET多文件上传 ASP.NET多文件上传
Asp.net同时上传多个文件Asp.net同时上传多个文件Asp.net同时上传多个文件Asp.net同时上传多个文件
ASP.NET同时上传多个文件 asp.net 1.1 c#
JS 实现文件流程框删除和新增,后台获取文件上传列表进行处理,进而实现多文件上传,【不是一次性多选文件自动生成多个连接的那种】,一积分下载回复即可返回,留下脚印吧,亲们
【ASP.NET编程知识】asp.net利用ashx文件实现文件的上传功能.docx