1
上傳圖片我想將圖像存儲到MS SQL服務器,當我將我的形象越來越目錄未找到異常的錯誤之後才提交按鈕。 在此先感謝。DirectotyNotFoundexception當我通過文件上傳工具在Asp.net
if(filuploadimages.PostedFile!=null)
{
string filename = filuploadimages.PostedFile.FileName.ToString();
string fileExt = System.IO.Path.GetExtension(filuploadimages.FileName);
filuploadimages.SaveAs(Server.MapPath("~/Productimages/" + filename));//error
}
你要創建的目錄。 –
怎麼樣?你能解釋清楚嗎? – Mathan
手動。用該路徑創建文件夾。 –