码迷,mamicode.com
首页 > 其他好文 > 详细

foreach on Request.Files

时间:2019-06-21 11:12:33      阅读:96      评论:0      收藏:0      [点我收藏+]

标签:use   get   prope   targe   http   col   file   overflow   tps   

https://stackoverflow.com/questions/1760510/foreach-on-request-files

The enumerator on the HttpFileCollection returns the keys (names) of the files, not the HttpPostedFileBase objects. Once you get the key, use the Item ([]) property with the key (filename) to get the HttpPostedFileBase object.

foreach (string fileName in Request.Files)
{
    HttpPostedFileBase file = Request.Files[fileName];

    ...
}

foreach on Request.Files

标签:use   get   prope   targe   http   col   file   overflow   tps   

原文地址:https://www.cnblogs.com/chucklu/p/11063335.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!