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