C# 从AsyncFileUpload调用方法';s上传完整的isn';他没有按预期工作

C# 从AsyncFileUpload调用方法';s上传完整的isn';他没有按预期工作,c#,asp.net,ajax,asyncfileupload,C#,Asp.net,Ajax,Asyncfileupload,我有一个AsyncFileUpload控件,当上传成功完成时,它应该显示一个面板并设置一些文本。当我调试它时,事件触发,我看到方法被正确调用,但是表单没有更新 以下是标记: <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <div class="well well-large"> <form class="navbar

我有一个AsyncFileUpload控件,当上传成功完成时,它应该显示一个面板并设置一些文本。当我调试它时,事件触发,我看到方法被正确调用,但是表单没有更新

以下是标记:

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
        <div class="well well-large">
            <form class="navbar-form pull-left">
                <ajaxToolkit:AsyncFileUpload runat="server" class="search-query" ID="AsyncFileUpload" Width="400px"
                    UploadingBackColor="AppWorkspace" ThrobberID="myThrobber" CompleteBackColor="#068712" OnUploadedComplete="AsyncFileUpload_UploadedComplete" />
                <br />
            </form>
        </div>
    </ContentTemplate>
    <Triggers>
        <asp:AsyncPostBackTrigger ControlID="AsyncFileUpload" EventName="UploadedComplete" />
    </Triggers>
</asp:UpdatePanel>

<asp:UpdatePanel ID="panAlertUpdatePanel" UpdateMode="Conditional" runat="server">
    <ContentTemplate>
        <asp:Panel runat="server" ID="panAlert" Visible="false">
            <div class="alert alert-success" id="divAlert" runat="server">
                <button id="Button1" runat="server" type="button" class="close" data-dismiss="alert">&times;</button>
                You shouldn't see this message!
            </div>
            <asp:Panel runat="server" ID="panMarquee" Visible="true">
                <div id="Div1" runat="server" class="progress progress-success progress-striped">
                    <div id="ProgressBar" runat="server" class="bar" style="width: 100%"></div>
                </div>
            </asp:Panel>
        </asp:Panel>
    </ContentTemplate>
</asp:UpdatePanel>
当我使用一个按钮作为触发器时,它工作得很好,但当我将它更改为AsyncFileUpload控件时,它就不工作了


有什么想法吗?

如果从触发器中删除“EventName”属性会发生什么情况?@jadarnel27刚刚尝试过。什么也没有发生。此消息是刷新updatepanel的唯一原因,还是您有一些控件在文件上载后也必须更新?@YuriyRozhovetskiy面板中显示了一些控件,并且更改了一条消息。现在,这就是它所做的一切。但我还需要它来启动异步操作。
protected void AsyncFileUpload_UploadedComplete(object sender, AjaxControlToolkit.AsyncFileUploadEventArgs e)
    {
        if (AsyncFileUpload.HasFile)
        {

            this.SetMessage(Message.Success);
        }
        else
        {

            this.SetMessage(Message.Fail);
        }
    }

    #endregion

    #region Miscellaneous

    private enum Message { Success, Fail }
    private void SetMessage(Message msg)
    {
        if (msg == Message.Success)
        {
            this.divAlert.InnerText = "Well done! The document appears to have uploaded successfully. Please wait...";
            this.divAlert.Attributes.Add("class", "alert alert-success");
        }
        else
        {
            this.divAlert.InnerText = "Oh snap! Something broke. Please contact IT right away.";
            this.divAlert.Attributes.Add("class", "alert alert-error");
        }

        this.panAlert.Visible = true;
        this.panAlertUpdatePanel.Update();
    }