Hello,
I am developing an application that manages a photo contest. In that application, I use an AsyncFileUpload control for the user selected photo. The server-side UploadedComplete does basic validation, and scales/clip the image as necessary.
The problem is, when i click on the submit button on the page, the content of the AsyncFileUpload gets sent with the other user-submitted data, so the user gets to wait twice as long to get a response from the server (I'm expecting photos that are between 3 and 7 Mb big, which takes a minute or two to upload).
My form looks like that:
<%-- ... snip - all other fields ... -->
<div style="margin-top: 20px; margin-bottom: 5px;">
<span class="texteB"><b>Upload a photo</b></span><br />
Browse your computer to find a photo.</div>
<div>
<asp:AsyncFileUpload onclientuploaderror="UploadError" persistfile="true" onuploadedcomplete="fuPhoto_UploadedComplete"
completebackcolor="#52ad0b" onclientuploadstarted="UploadStarted" id="fuPhoto"
throbberid="throbber" runat="server" />
</div>
<div runat="server" id="throbber" style="display: none; margin: 8px 0 15px 0">
<div style="float: left; width: 48px;">
<img src="images/throbber.gif" /></div>
<span class="texteV_14pt"><b>Please wait while
<br />
your photo is uploaded...</b></span>
</div>
<div style="margin-top: 20px; margin-bottom: 20px;">
Please double-check your informations and press Send when ready.</div>
<div>
<asp:ImageButton onclick="btnSubmit_Click" ImageUrl="images/bt_envoyer_demande.gif"
runat="server" id="btnSubmit" />
</div>
Is there something I missed out in the documentation? I've been working on this all day without much success.
Thanks in advance!