这让我发疯,尝试在谷歌搜索解决方案,但没有任何相关的问题。好吧这就是问题:我有一个用户控件有一个更新面板,它有一个转发器,它有一个下拉列表。现在onSelectedInde
x更改下拉事件我想执行一些操作
因此,当我设置autopostback= true
并绑定事件处理程序时,我的更新面板将继续使用异步回发无限地更新内容(在循环中)。我真的无法弄清楚这个问题。如果可能,任何人都可以提出替代方法来做同样的事情吗?我的意思是有没有办法在没有autopostback= true
的情况下做到这一点?
ascx代码:
<asp:updatepanel id="upd1" runat="server" childrenastrigger="true">
<contenttemplate>
<asp:repeater id="rpt" runat="server">
<asp:dropdown="drp1" runat="server" autopostback="true" OnSelectedIndexchanged="ddl_selectindexchanged"/>
</asp:repeater>
</contenttemplate>
P.S:它的伪代码和selectedindexchanged事件甚至没有被触发,但在此用户控件的页面加载循环中发生异步回发。