ASP.NET中怎么实现多文件同时上传?要求点浏览的时候可以一次性多选文件

2025-01-07 06:37:41
推荐回答(1个)
回答1:

upload.aspx

<%@ page language="c#" codebehind="upload.aspx.cs" autoeventwireup="false" inherits="webportal.upload" %>



多文件上传





多文件上传









width="500px" borderstyle="none" bordercolor="white">







upload.aspx.cs

using system;
using system.collections;
using system.componentmodel;
using system.data;
using system.drawing;
using system.web;
using system.web.sessionstate;
using system.web.ui;
using system.web.ui.webcontrols;
using system.web.ui.htmlcontrols;

namespace webportal
{
///
/// upload 的摘要说明。
/// 实现多文件上传
///

public class upload : system.web.ui.page
{
protected system.web.ui.webcontrols.button uploadbutton;
protected system.web.ui.webcontrols.label strstatus;

private void page_load(object sender, system.eventargs e)
{
/// 在此处放置用户代码以初始化页面
if (this.ispostback) this.saveimages();
}