Author: prontonet | Posted on: 8/7/2010 8:38:12 AM | Views : 249

hi,
 
In a button click event, I am uploading files to my server but getting duplicates in the loop.
So if a user uploads 3 i end up with 6 and if i refresh it loops again
Am I missing some code so that just 1 file of is processed.
 
 
 HttpFileCollection uploadedFiles = Request.Files;
        for (int i = 0; i < uploadedFiles.Count; i++)
        {
        
            HttpPostedFile file = uploadedFiles[i];
            string fileExt = Path.GetExtension(file.FileName).ToLower();
            string fileName = Path.GetFileName(file.FileName);
       & ...

Go to the complete details ...