ASP timer Control is refreshing the whole page?(ASP 定时器控件是否刷新整个页面?)
问题描述
我有一个 ASP 计时器控件,它应该每三分钟运行一次.尽管我将 Timer 控件保留在更新面板中,但它每次运行时都会刷新整个页面.
有没有只刷新页面的特定部分,而不是整个页面?
<asp:UpdatePanel ID="UpdatePanel4" runat="server"><内容模板><asp:Timer ID="Timer1" runat="server" ontick="Timer1_Tick" Interval="300000" ></asp:定时器></内容模板></asp:UpdatePanel> <asp:Timer runat="server" id="UpdateTimer" interval="200" ontick="function"/><asp:UpdatePanel runat="server" id="TimedPanel" updatemode="Conditional"><触发器><asp:AsyncPostBackTrigger controlid="UpdateTimer" eventname="Tick"/></触发器><内容模板><asp:Label runat="server" id="label1"/><asp:TextBox ID="textbox1" runat="server"></asp:TextBox></内容模板></asp:UpdatePanel>I have a ASP timer control which is supposed to run every three minutes. Although I kept the Timer control in an update panel, it is refreshing the whole page every time it runs.
Is there any it only refresh the particular section of the page, not the whole page?
<div>
<asp:UpdatePanel ID="UpdatePanel4" runat="server">
<ContentTemplate>
<asp:Timer ID="Timer1" runat="server" ontick="Timer1_Tick" Interval="300000" >
</asp:Timer>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<asp:Timer runat="server" id="UpdateTimer" interval="200" ontick="function" />
<asp:UpdatePanel runat="server" id="TimedPanel" updatemode="Conditional">
<Triggers>
<asp:AsyncPostBackTrigger controlid="UpdateTimer" eventname="Tick" />
</Triggers>
<ContentTemplate>
<asp:Label runat="server" id="label1" />
<asp:TextBox ID="textbox1" runat="server"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel>
这篇关于ASP 定时器控件是否刷新整个页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:ASP 定时器控件是否刷新整个页面?
基础教程推荐
- 禁止输入少量字符,例如'<'、'&a 2022-01-01
- 我应该在后面的代码中直接使用 Linq To SQL 还是使 2022-01-01
- C# 从 List<List<int>> 中删除重 2022-01-01
- Moq It.Is<>不匹配 2022-01-01
- 当值可以是对象或空数组时反序列化 JSON 2022-01-01
- .NET SerialPort DataReceived 事件未触发 2022-01-01
- WPF 模态进度窗口 2022-01-01
- 如果有人提交恶意软件Nuget包怎么办? 2022-01-01
- Azure Functions:CosmosDBTrigger 未在 Visual Studio 中触发 2022-01-01
- 如何使用 .Net 检查 Active Directory 服务器是否已启动并正在运行? 2022-01-01
