我正在使用AsyncFileupload。文件上传完美但两次,因为事件OnUploaded complete被触发两次。我正在使用两个更新面板,如下所示
<asp:UpdatePanel ID="UpdatePanelTop" runat="server">
<Triggers>
<asp:PostBackTrigger ControlID="ButtonSave" />
</Triggers>
<ContentTemplate>
<uc1:Alert ID="Alert1" runat="server" />
<asp:Panel ID="PanelAdminUpload" runat="server"
Width="90%">..........some code here .....
<asp:UpdatePanel runat="server" ID="UpdatePanelAFU">
<ContentTemplate>
<tr>
<td>File: </td>
<td class="style1">
<ajaxToolkit:AsyncFileUpload ID="AsyncFileUploadPub" runat="server"
ToolTip="Select the file"
OnUploadedComplete="AsyncFileUploadPub_UploadedComplete"
OnClientUploadComplete="uploadComplete"
UploaderStyle="Modern" UploadingBackColor="#CCFFFF" ThrobberID="myThrobber" />
<asp:Label runat="server" ID="myThrobber" Style="display: none;"><img align="middle" alt="" src="../Styles/images/Animated Gif/Uploading.gif" /></asp:Label>
<asp:Label ID="LabelOpt" runat="server" Text="(Optional) "></asp:Label></td>
</tr>
<tr>
<td>File Details:</td>
<td>
<asp:Label runat="server" ID="lblFileDetails" Font-Italic="true"></asp:Label></td>
</tr>
</ContentTemplate>
</asp:UpdatePanel>
......some code here .... </ContentTemplate>
</asp:UpdatePanel>
答案 0 :(得分:1)