Model view controller 如何将HttpPostedFile发送到某个控制器中的操作

Model view controller 如何将HttpPostedFile发送到某个控制器中的操作,model-view-controller,httppostedfilebase,httppostedfile,Model View Controller,Httppostedfilebase,Httppostedfile,如果要将HttpPostedFile类型的对象发送到某个操作,则可以在该操作中获取null对象。那么如何发送呢?为此,您可能需要通过临时数据发送HttpPostedFile。有关示例,请参见以下内容: HttpPostedFileBase file; TempData["FilePosted"] = file; 在行动中,做到以下几点: HttpPostedFileBase file = (HttpPostedFileBase)TempData["FilePosted"]; 你好。请不要在你

如果要将HttpPostedFile类型的对象发送到某个操作,则可以在该操作中获取null对象。那么如何发送呢?

为此,您可能需要通过临时数据发送HttpPostedFile。有关示例,请参见以下内容:

HttpPostedFileBase file;
TempData["FilePosted"] = file;
在行动中,做到以下几点:

HttpPostedFileBase file = (HttpPostedFileBase)TempData["FilePosted"];

你好。请不要在你的问题和回答中加上“做一个成功的穆斯林”和“以真主的名义”。我以前从你的材料中编辑过这篇文章,我不想认为你故意给我工作。