<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:Timer ID="Timer1" runat="server" Interval="5000">
</asp:Timer>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<asp:Label ID="lblTitleType" runat="server"></asp:Label>
</asp:UpdatePanel>
如何使用Timer控件,每5秒刷新Label控件,求解答
this.Label1.Text=DateTime.Now();
{
this.Label1.Text="Label总要显示文本值吧,你想‘刷新’,就在这里改变值就行啦";
}
<asp:PostBackTrigger ControlID="Timer1" />
</Triggers>