计时器刷新所有更新面板以刷新

时间:2019-02-21 10:04:33

标签: c# asp.net webforms updatepanel

我的html和3个updatepanel中有一个计时器,我想刷新一个特定的updatepanel,而不是其他2个。但是,由于某种原因,计时器导致所有updatepanel刷新。这是我要刷新的updatepanel代码:

foo

其他更新面板如下所示:没有触发器:

 <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
    <asp:Timer runat="server" id="UpdateTimer" interval="2000" ontick="function" />

 <asp:UpdatePanel ID="UpdatePanelMain" runat="server" updatemode="Conditional">
            <Triggers>
            <asp:AsyncPostBackTrigger controlid="UpdateTimer" eventname="Tick" />
            </Triggers>
            <ContentTemplate>

但是它们仍在更新中,知道为什么吗?

0 个答案:

没有答案