【发布时间】:2011-11-21 11:09:33
【问题描述】:
我有以下标记:
<Asp:updatepanel id="up" runat="server">
<contenttemplate>
<asp:Button id="btn" runat="server" text="test" />
</contenttemplate>
</Asp:updatepanel>
但是,这会强制进行完整的回发。
我创建了这个测试,因为更复杂的 UpdatePanel 不会在不回发的情况下重新渲染,但是这个简单的测试也不能正常工作。
我也尝试过声明触发器,尽管我认为您不必这样做:
<Asp:updatepanel id="up" runat="server">
<contenttemplate>
<asp:Button id="btn" runat="server" text="test" />
</contenttemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btn" EventName="Click" />
</Triggers>
</Asp:updatepanel>
但是,这也行不通。
【问题讨论】:
-
检查 ScriptManager 的
EnablePartialRendering属性。 -
干杯@YuriyRozhovetskiy,你是正确的,我不知道什么时候改变了。把它作为答案,我会标记它
标签: asp.net updatepanel