aspx 页面上的 Firefox 回发问题
我在 aspx 页面上遇到一个奇怪的问题。简而言之,我在页面上有 3 个单选按钮和一个表格。当用户激活中间的单选按钮时,会向用户显示两个文本框和一个按钮。该按钮用作回发页面的一种方式。无论如何,回发应该只是部分回发。在 IE 中一切正常,但在 Firefox 中我发现如果我在两个文本框之外单击然后单击刷新按钮,整个页面都会回发,而不是部分回发。如果我从两个文本框中选择一个日期,并且没有将光标移出其中一个文本框,然后单击按钮,则仅执行部分回发,这就是我想要的。问题是,如何使用 Firefox 解决此问题?
该页面基本上如下所示:
<asp:RadioButtonList>
<asp:ListItem Value="1" />
<asp:ListItem Value="2" />
<asp:ListItem Value="3" />
<asp:RadioButtonList>
<div>
...
<asp:TextBox />
...
<asp:TextBox />
...
<asp:Button ID="refreshButton" />
</div>
...
<asp:UpdatePanel>
<ContentTemplate>
<GridView ... />
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger
ControlID="filterRBL"
EventName="SelectedIndexChanged" />
<asp:AsyncPostBackTrigger
ControlID="numberOfRecordsPerPageDDL"
EventName="SelectedIndexChanged" />
<asp:AsyncPostBackTrigger
ControlID="refreshButton"
EventName="Click" />
</Triggers>
</asp:UpdatePanel>
提前致谢。
I have a strange problem on an aspx page. In short, I have 3 radio buttons and a table on the page. When the user activates the middle radio button two text boxes and a button is shown to the user. The button serves as a way to post back the page. Anyway, the postback should be only a partial postback. Everything works fine in IE but in Firefox I found out that if I click outside of the two text boxes and then hit the refresh button, the whole page is posted back instead of a partial postback. If I select a date from the two text boxes and don't get the cursor out of one of the text boxes and then hit the button, only a partial post back is performed, which is what I want. The question is, how could I resolve this issue with Firefox ?
The page basically looks like this:
<asp:RadioButtonList>
<asp:ListItem Value="1" />
<asp:ListItem Value="2" />
<asp:ListItem Value="3" />
<asp:RadioButtonList>
<div>
...
<asp:TextBox />
...
<asp:TextBox />
...
<asp:Button ID="refreshButton" />
</div>
...
<asp:UpdatePanel>
<ContentTemplate>
<GridView ... />
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger
ControlID="filterRBL"
EventName="SelectedIndexChanged" />
<asp:AsyncPostBackTrigger
ControlID="numberOfRecordsPerPageDDL"
EventName="SelectedIndexChanged" />
<asp:AsyncPostBackTrigger
ControlID="refreshButton"
EventName="Click" />
</Triggers>
</asp:UpdatePanel>
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能需要将控件组放入
标记中和/或更改 UpdatePanel 标记上的 UpdateMode="Conditional"You may need to put the group of controls into a
<asp:Panel>
tag and/or change the UpdateMode="Conditional" on your UpdatePanel tag