In ASP.Net C#, on button click event I find the FileUpload Control within DataList and It gives error?
<p>This is the Error:</p>

<blockquote>
  <ul>
  <li>Collection was modified; enumeration operation may not execute.</li>
  </ul>
</blockquote>

<p>This error is found when for each process tries to find the items.</p>

<pre><code> protected void SubmitButton_Click(object sender, EventArgs e)
 {
      foreach (DataListItem item in this.ImageRepeater.Items)
      {
           FileUpload fup = (FileUpload)ImageRepeater.FindControl("ImageUpload");
           if (fup.HasFile)
           {
               updateImageChanges();
               divTopImageCheckChangedmessage.Visible = false;
            }
      }         
   }
</code></pre>

<p>My requirement is that I want to satisfy the check if there is no file loaded into Fileupload control within ASP.Net DataList then not to allow, the <code>updateImageChanges();</code> function to be hit.</p>

<p>I will be grateful to you all.</p>
