我有以下控制器操作:
public ActionResult BandRegister(BandProfileModel model, HttpPostedFileBase file)
{
return View(_profileService.CreateBandProfile(model, file));
}
这是我的服务:
using System.Linq;
using System.Web.Mvc;
using System.Web;
public BandProfileModel CreateBandProfile(BandProfileModel model, HttpPostedFileBase file)
{
}
但是在我的服务班级里,它一直在说:
找不到类型或名称空间名称HttpPostedFileBase
我不明白为什么。我没有包括所有参考资料吗?
这听起来像您缺少对System.Web的引用,而该类型的定义就是在其中。检查您的参考,并在必要时添加它。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句