Can't get AsyncFileUpload to work in update panel
<p>I have a user control with a updatepanel, script manager and a asyncfileupload control.</p>

<pre><code>&lt;%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %&gt; 
&lt;asp:ScriptManager ID="ScriptManager2" runat="server" &gt;&lt;/asp:ScriptManager&gt;
&lt;asp:UpdatePanel ID="UpdatePanel1" runat="server"&gt;
    &lt;ContentTemplate&gt;
        &lt;cc1:AsyncFileUpload ID="AsyncFileUpload2" runat="server" /&gt;
        &lt;asp:LinkButton id="lbSubmitOrder" runat="server" title="Submit Order Request" class="btn_blue_dynamic_med"/&gt;
    &lt;/ContentTemplate&gt;      
&lt;/asp:UpdatePanel&gt;
</code></pre>

<p>In my code behind:</p>

<pre><code> Dim path As String = Server.MapPath("~/temp/test.tmp")

 AsyncFileUpload2.SaveAs(path)
</code></pre>

<p>In my AsyncFileUpload2 object the filename is nothing.  I can't seem to get a refernce to the file that is supposed to be uploaded.</p>

<p>-Nate</p>

<p><strong>UPDATE</strong><br>
I've added </p>

<pre><code>Private Sub AsyncFileUpload1_UploadedComplete(ByVal sender As Object, ByVal e As AjaxControlToolkit.AsyncFileUploadEventArgs) Handles AsyncFileUpload1.UploadedComplete
    If e.state = AjaxControlToolkit.AsyncFileUploadState.Success Then
        '....'
    Else
        showErrorMessage(e)
    End If
End Sub
</code></pre>

<p>I can't hit a break point at the "if" statement after I choose a file.  I guess there is something wrong on my page with how ajax is working?  Not sure what it is though.</p>

<p><strong>FIXED!</strong><br>
I was displaying the ajax upload box via a radio button with a visible=true/false div.  The answer told me that the control has to be there the page loads.  I took away the div and everything worked! I will now do the show/hide through jquery (which I should have done in the first place).  </p>
