积极答复者
动态上传文件问题(难)

问题
答案
-
你好,
你可以使用类似如下的方法去获得文件:
foreach (string key in HttpContext.Current.Request.Files.Keys)
{
HttpPostedFile MyPostedMember = HttpContext.Current.Request.Files[key];
String MyFileName = MyPostedMember.FileName;}
这样的话,你可以根据key来区分不同区域上传的文件。
谢谢!
Leo Tang [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- 已标记为答案 LeoTangModerator 2011年1月6日 9:19
全部回复
-
你好,
你可以使用类似如下的方法去获得文件:
foreach (string key in HttpContext.Current.Request.Files.Keys)
{
HttpPostedFile MyPostedMember = HttpContext.Current.Request.Files[key];
String MyFileName = MyPostedMember.FileName;}
这样的话,你可以根据key来区分不同区域上传的文件。
谢谢!
Leo Tang [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- 已标记为答案 LeoTangModerator 2011年1月6日 9:19