Asp.net UpdatePanel和UpdateProgress不工作

Asp.net UpdatePanel和UpdateProgress不工作,asp.net,javascript,silverlight,Asp.net,Javascript,Silverlight,如果我使用:onSelectedIndex,则更改如下: <asp:DropDownList ID="ddl1" AutoPostBack="true" OnSelectedIndexChanged="Test_SelectedIndexChanged" runat="server"></asp:DropDownList> <asp:DropDownList ID="ddl1" AutoPostBack="true" onchange="selectValues

如果我使用:onSelectedIndex,则更改如下:

<asp:DropDownList ID="ddl1" AutoPostBack="true"  OnSelectedIndexChanged="Test_SelectedIndexChanged" runat="server"></asp:DropDownList>
<asp:DropDownList ID="ddl1" AutoPostBack="true" onchange="selectValues()" runat="server"></asp:DropDownList>

UpdatePanel和UpdateProgress工作正常,这意味着它显示了我的小gif等

但是,只要我将其更改为调用javascript代码,如下所示:

<asp:DropDownList ID="ddl1" AutoPostBack="true"  OnSelectedIndexChanged="Test_SelectedIndexChanged" runat="server"></asp:DropDownList>
<asp:DropDownList ID="ddl1" AutoPostBack="true" onchange="selectValues()" runat="server"></asp:DropDownList>

它停止工作了。进展没有显现出来。现在,在有人问我为什么要这样做之前,这是因为我需要在托管代码中调用一些脚本。这和silverlight有关


有人有解决这个问题的方法吗?

我想这是因为UpdatePanel更新时会显示进度

当您从列表中选择时,您的第二个下拉菜单是否会触发更新面板

您可能需要在下拉列表中添加OnSelectedIndexChanged事件,该事件不会触发更新面板

您可以在yout SelectValues()函数中添加一些javascript来显示进度面板,我相信它只是一个带有图像的div,您可以使用javascript将css更改为可见


希望有帮助

我认为您的javascript返回了错误的值。因此,dropdown selectedindex change事件的服务器端事件不会触发,因为它不会回发整个页面。

如果更新面板不刷新,updateprogress控件将不会运行。如果您尝试更新某些内容而不调用updatepanel的更新(即使用您自己的JS),updateprogress将无法工作