Hi all ,
by using below reference i am saved file in specific location. while using multiple files like same or different file formats. "fileupload" save the same content for all documents if the file format is same else is different then the file is corrupted but size of all files are same. why beacause it takes the first file content and size to remaing files. did you understand please help me
here it is my code
Thanks in advance
if (FUAttchmnts.HasFile)
{
string folderPath = "D:\\UPLOADS\\";
foreach (HttpPostedFile postfiles in FUAttchmnts.PostedFiles)
{
//Msg.Attachments.Add(new Attachment(FUAttchmnts.PostedFile.InputStream, FUAttchmnts.FileName));
string FileNm = "";
FileNm = System.IO.Path.GetFileName(postfiles.FileName.ToString());
//Save the File to the Directory (Folder).
FUAttchmnts.SaveAs(folderPath + Path.GetFileName(FileNm));
Msg.Attachments.Add(new Attachment(folderPath + Path.GetFileName(FileNm)));
}
}