if (FileUpload1.HasFile)
try
{
FileUpload1.SaveAs("C:\\Users\\Vinay\\Documents\\Visual Studio 2010\\WebSites\\Onlinedoctorsportal\\vini" +
FileUpload1.FileName);
Label10.Text = "File name: " +
FileUpload1.PostedFile.FileName + "<br>" +
FileUpload1.PostedFile.ContentLength + " kb<br>" +
"Content type: " +
FileUpload1.PostedFile.ContentType;
}
catch (Exception ex)
{
Label10.Text = "ERROR: " + ex.Message.ToString();
}
else
{
Label10.Text = "You have not specified a file.";
}
//Stream obj = FileUpload1.FileContent;
//Session["file"] = obj;
//Response.Redirect("Form3.aspx");
}
}
我想是要上傳的文件保存到一個文件夾中名爲VINI,但它顯示的文件,但不能將其保存到指定文件夾,如圖請幫上傳文件到asp.net中的文件夾?
發佈異常堆棧跟蹤(如果有)。請確認** Button **的處理程序是否已連接。 – adatapost