C# 找不到类型或命名空间名称HttpPostedFileBase
我有以下控制器操作:C# 找不到类型或命名空间名称HttpPostedFileBase,c#,asp.net,C#,Asp.net,我有以下控制器操作: public ActionResult BandRegister(BandProfileModel model, HttpPostedFileBase file) { return View(_profileService.CreateBandProfile(model, file)); } 这是我的服务: using System.Linq; using System.Web.Mvc; using System.Web; public BandProfileMod
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的引用,而System.Web就是定义该类型的地方。检查您的参考资料,必要时添加