【发布时间】:2016-04-12 09:28:05
【问题描述】:
我的页面中有 RadioButtonList 和 Listvie。我正在使用更新面板来避免回发现在我的 radioButtonList 用作列表视图的过滤器。我的问题在我的 radiobuttonList 中,我必须使用 clientIDmode=static 但如果我这样做了,那么我的更新面板就没有用了,因为当 radiobuttonList 被更改时会有完整的回发。如何在不删除 clientIdmode=static 的情况下解决此问题。我看到了一些相同帖子的解决方案,但真的不明白。请帮帮我。
我的代码具有以下结构。
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:RadioButtonList ID="areasList" CssClass="mark" AutoPostBack="true" runat="server" ClientIDMode="static" RepeatLayout="Flow">
</asp:RadioButtonList>
ListviewHere
</ContentTemplate>
</asp:UpdatePanel>
【问题讨论】:
-
只是好奇:为什么你“必须使用”
ClientIDMode="Static"? -
@ConnorsFan 因为我在切换中有 radioButtonList,如果我不使用 clientIDMde=static 则切换功能不起作用,因为页面加载时 ID 会被修改
标签: asp.net vb.net updatepanel