Page.Request.Files.Count问题 在web里边Page.Request.Files.Count 获取的文件数量怎么是1啊!求高人指点 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Response.CacheControl = "no-cache"; string s_rpath =@"E:\My Documents\Visual Studio 2008\WebSites\SWFUpload\demos\applicationdemo.net"; string Datedir = DateTime.Now.ToString("yy-MM-dd"); string updir = s_rpath + "\\" + Datedir; //string tempFile = Request.PhysicalApplicationPath; if (this.Page.Request.Files.Count > 0) { try { for (int j = 0; j < this.Page.Request.Files.Count; j++) { HttpPostedFile uploadFile = this.Page.Request.Files[j]; if (uploadFile.ContentLength > 0) { if (!Directory.Exists(updir)) { Directory.CreateDirectory(updir); } string extname = Path.GetExtension(uploadFile.FileName); string fullname=DateTime.Now.Year.ToString()+DateTime.Now.Month.ToString()+DateTime.Now.Day.ToString()+ DateTime.Now.Hour.ToString()+DateTime.Now.Minute.ToString()+DateTime.Now.Second.ToString(); string filename = uploadFile.FileName; uploadFile.SaveAs(string.Format("{0}\\{1}", updir, filename)); } } } catch (Exception ex) { Response.Write("Message"+ ex.ToString()); } } .net用DbTransaction实现跨数据库事务,求大神解释 C#将txt中的回车字符复制到SQL Server中 socket 异步传输 求生成chm格式的数据字典工具 如何按快捷弹出窗体? c#中如何得到字符的象素宽度?知道的麻烦指点一下! tabControl1 TabPage 问一个关于 XenoCode 2006 的问题 关于转换的问题!!! CefSharp.BrowserSubprocess 已停止工作”,如何解决 c# 发送邮件出错 求大神 ASP.NET2.0 的一个网站,VS2010调试功能生效,放在II6上功能失效
string s_rpath =@"E:\My Documents\Visual Studio 2008\WebSites\SWFUpload\demos\applicationdemo.net";
string Datedir = DateTime.Now.ToString("yy-MM-dd");
string updir = s_rpath + "\\" + Datedir;
//string tempFile = Request.PhysicalApplicationPath;
if (this.Page.Request.Files.Count > 0)
{
try
{ for (int j = 0; j < this.Page.Request.Files.Count; j++)
{ HttpPostedFile uploadFile = this.Page.Request.Files[j]; if (uploadFile.ContentLength > 0)
{
if (!Directory.Exists(updir))
{
Directory.CreateDirectory(updir);
}
string extname = Path.GetExtension(uploadFile.FileName);
string fullname=DateTime.Now.Year.ToString()+DateTime.Now.Month.ToString()+DateTime.Now.Day.ToString()+ DateTime.Now.Hour.ToString()+DateTime.Now.Minute.ToString()+DateTime.Now.Second.ToString();
string filename = uploadFile.FileName; uploadFile.SaveAs(string.Format("{0}\\{1}", updir, filename));
}
}
}
catch (Exception ex)
{
Response.Write("Message"+ ex.ToString());
}
}