如何从 UpdatePanel 中的按钮强制完全回发?
问题描述:
如何从 UpdatePanel 中的按钮强制完全回发?
How do I force full post-back from a button within an UpdatePanel?
答
您可以使用 Triggers 属性的 UpdatePanel 以注册触发完整回发的操作.
You can use the Triggers property of the UpdatePanel to register actions that trigger a full postback.
向其添加 PostBackTrigger 对象属性,包含需要触发完整回发的控件的 ControlID.
Add a PostBackTrigger object to that property, containig the ControlID of the control which needs to trigger a full postback.
<asp:UpdatePanel ID="UpdatePanel1" UpdateMode="Conditional" runat="server">
<ContentTemplate>
...
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="myFullPostBackControlID" />
</Triggers>
</asp:UpdatePanel>