FileUpload is not working within update panel
<p>So what I am trying to do is, have a user select a file to upload.  Since I am only going to accept images, I will test the extension.  I also want to limit the file size to under 2mb, so I will test that(haven't implemented in code yet).  If the file they have selected passes, then I want the label to say "File Accepted", and store the file upload information for a later button click.  This will happen once the user has finished filling out the rest of the form.  Eventually, I will put an UpdateProgress control on the page while it is checking if the file is allowed.  I would rather not have it post back for this, so if I can get it to work, that would be great.  BTW, this will all work fine if I take the label out of the update panel.</p>

<p>What happens when I run this, is it will go to the else statement of the first if and return "Please select a file."  Meaning that FileUpload1.HasFile is returning false.  The only reason I can see that this is happening is because the UpdatePanel can not access that info from the FileUpload control?</p>

<p>Code Behind: </p>

<pre><code>    Label SubmitButtonLabel2= (Label)UpdatePanel1.FindControl("SubmitButtonLabel");
    if (FileUpload1.HasFile)
    {
        string[] fileName = FileUpload1.FileName.Split('.');
        if ((fileName[fileName.Length - 1] == "jpg") ||
            (fileName[fileName.Length - 1] == "gif") ||
            (fileName[fileName.Length - 1] == "bmp") ||
            (fileName[fileName.Length - 1] == "jpeg") ||
            (fileName[fileName.Length - 1] == "png"))
        {
            SubmitButtonLabel2.Text = "File Accepted.";
        }
        else
        {
            SubmitButtonLabel2.Text = "File type not allowed.  Please choose another.";
        }
    }
    else
    {
        SubmitButtonLabel.Text = "Please select a file.";
    }
</code></pre>

<p>Page: </p>

<pre><code>&lt;body&gt;
&lt;form id="form1" runat="server"&gt;
&lt;asp:ScriptManager ID="ScriptManager1" runat="server" /&gt;
    &lt;div&gt;
        &lt;asp:FileUpload ID="FileUpload1" runat="server" /&gt;
        &lt;asp:Button ID="SubmitButton" runat="server" Text="Submit File" OnClick=SubmitButton_Click /&gt;
        &lt;asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="always"&gt;
            &lt;ContentTemplate&gt;
                &lt;asp:Label ID="SubmitButtonLabel" runat="Server" /&gt;
            &lt;/ContentTemplate&gt;
            &lt;Triggers&gt;
                &lt;asp:PostBackTrigger ControlID="SubmitButton" /&gt;
            &lt;/Triggers&gt;
        &lt;/asp:UpdatePanel&gt;

    &lt;/div&gt;
&lt;/form&gt;
&lt;/body&gt;
</code></pre>
