在UpdatePanel内有一个DropDownList,它的autopostback属性设置为true。我们在触发器中保留了Postback是异步回发的语句,我们在后面的代码中有下拉处理程序。DropDownList SelectedIndexChanged事件在某些机器中未触发
有一个奇怪的问题,事件不会在某些机器上被解雇。我们还包含了InitializeRequest,并在那里检查了回发发生的ID。它在一台机器上显示为空,而在另一台机器上工作则没有任何问题。
这是一个浏览器问题或任何其他问题?我们无法知道为什么会出现这种问题,因为同一段代码在某些机器上工作。
<asp:UpdatePanel runat="server" ID="UpdatePanel1" UpdateMode="Conditional">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="DropDown1" EventName="SelectedIndexChanged" />
</Triggers>
<ContentTemplate>
<asp:DropDownList ID=" DropDown1" runat="server" AutoPostBack="true"> </asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
Private Sub DropDown1_SelectedIndexChanged(default args)Handles DropDown1.SelectedIndexChanged End Sub function InitializeRequest(sender,args){
if (args.get_postBackElement().id == '<%= DropDown1.ClientID %>'){ }
}
显示您的代码。 –
ASPX 的 的 <的ContentTemplate> 的 asp:DropDownList> asp:UpdatePanel> Private Sub DropDown1_SelectedIndexChanged(sender As Object, )Handle DropDown1.SelectedIndexChanged End Sub –
Phani