I want to upload multiple images to folder on button click. I get error like acess to path is denied in uploadedFile.SaveAs method.
Access to the path D:\Codes\Kanpur Applications\... is denied
I have enabled all the permission to the folder still i get acess denied error.
string strPath = Server.MapPath("~/Source images/" + HiddenField2.Value);
if (FileUpload4.HasFiles)
{
foreach (HttpPostedFile uploadedFile in FileUpload4.PostedFiles)
{
uploadedFile.SaveAs(strPath);
}
}
Please help