string []upfiles = Request.Files.AllKeys;
string filenames = "";
foreach (string s in upfiles)
{
if (s == "txt")
{
}
else if (s == "txt1")
{
}
filenames += s+"
";
}
Response.Write(filenames);
........................注意:你的是 .NET 后台获取。
估计你是获取不到的。因为你的上传的都是 html,而不是asp.net 控件。
你可以使用.NET fileuploader 控件。
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
无标题页
根据
foreach (string s in upfiles)
{
if (s == "txt")
{
}
else if (s == "txt1")
{
}
filenames += s+"";
}
来得到你想要的 上传文件。。
定义一个string [] s
然后s[i]=Request.Files[i].FileName;
定义一个string [] 这样看看