2
Reply

2 multifile upload

alaa

alaa

Sep 2 2014 3:48 PM
848
hi every body 
how can i use 2 multifile upload in the same page
i had try this code
protected void uploadFile_Click(object sender, EventArgs e)
{
if (UploadImages1.HasFiles)
{
foreach (HttpPostedFile uploadedFile in UploadImages1.PostedFiles)
{
uploadedFile.SaveAs(System.IO.Path.Combine(Server.MapPath("~/Images/"),
uploadedFile.FileName)); listofuploadedfiles.Text += String.Format("{0}<br />", uploadedFile.FileName);
}
}
 
if (UploadImages2.HasFiles)
{
foreach (HttpPostedFile uploadedFile in UploadImages2.PostedFiles)
{
uploadedFile.SaveAs(System.IO.Path.Combine(Server.MapPath("~/Images2/"),
uploadedFile.FileName)); listofuploadedfiles.Text += String.Format("{0}<br />", uploadedFile.FileName);
}
}

}
 
but they count the all photos despite they are different the 2 file upload count the all photos on page
how can solve this problem ? 
 
 

Upload Source Code  Select only zip and rar file.
Answers (2)