使用Timer控制两个UpdatePanel中的一个
<asp:ScriptManager ID="ScriptManager1" runat="server" >
</asp:ScriptManager >
</div >
<asp:Timer ID="Timer1" runat="server" Interval="5000" OnTick="Timer1_Tick" >
</asp:Timer >
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" >
<ContentTemplate >
<asp:Label ID="Label1" runat="server" Text="Label" > </asp:Label >
</ContentTemplate >
<Triggers >
<asp:AsyncPostBackTrigger ControlID="Timer1" / >
</Triggers >
</asp:UpdatePanel >
<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional" >
<ContentTemplate >
<asp:Label ID="Label2" runat="server" Text="Label" > </asp:Label >
</ContentTemplate >
</asp:UpdatePanel >
我的就是按照上面的方法做的
使用 <asp:Timer ID="Timer1" runat="server" Interval="5000" OnTick="Timer1_Tick" >
</asp:Timer >
过了5秒以后。
UpdatePanel2整个消失了!