编程开发 > ASP > 文章内容

FileUpload上传多文件出现错误的解决方法(三)

2010-10-25编辑:dan
ASPX 代码
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="MultiFileUpload.aspx.cs"
    Inherits="MultiFileUplaod" %>
<!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>
</head>
<body>
    <form id="form1" runat="server">
    <asp:HiddenField ID="allFileSize" runat="server" Value="0" />
    <table>
        <tr>
            <td align="right">
                本地文件:
            </td>
            <td>
                <asp:FileUpload ID="FileUpload1" runat="server" />
            </td>
        </tr>
        <tr>
            <td align="right">
                文件列表:
            </td>
            <td>
                <asp:ListBox ID="lbxFile" runat="server" Height="145px" Width="245px" CssClass="txt">
                </asp:ListBox>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <asp:Button ID="btnAdd" runat="server" Text="添加文件" OnClick="btnAdd_Click" />&nbsp;&nbsp;
                <asp:Button ID="btnDelete" runat="server" Text="删除文件" OnClick="btnDelete_Click" />&nbsp;&nbsp;
                <asp:Button ID="btnPost" runat="server" Text="完成上传" OnClick="btnPost_Click" />
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
FileUpload上传多文件出现错误的解决方法(二)

热点推荐

登录注册
触屏版电脑版网站地图