0
我正在将图像保存在我的MVC项目的内容文件夹中。图像成功保存在正确的路径中,但未包含在我的项目中。下面是我如何保存它:在解决方案中包含图像代码
var uploadedFile = this.Request.Files[0];
if (uploadedFile.ContentLength != 0)
{
string savedFileName = Server.MapPath("..") + "\\Content\\images\\myImages\\" + theId + ".jpg";
uploadedFile.SaveAs(savedFileName);
}
它不能在我的解决方案中看到。如何包含它?
正如我已经说过,我想包含它的代码。 – 2012-03-15 10:07:46
@Srcee - 更新了我的答案。 – 2012-03-15 10:17:08