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 定时器控件是否刷新整个页面?


基础教程推荐
- 从 VS 2017 .NET Core 项目的发布目录中排除文件 2022-01-01
- 错误“此流不支持搜索操作"在 C# 中 2022-01-01
- 如何动态获取文本框中datagridview列的总和 2022-01-01
- 将事件 TextChanged 分配给表单中的所有文本框 2022-01-01
- 全局 ASAX - 获取服务器名称 2022-01-01
- 首先创建代码,多对多,关联表中的附加字段 2022-01-01
- 是否可以在 asp classic 和 asp.net 之间共享会话状态 2022-01-01
- JSON.NET 中基于属性的类型解析 2022-01-01
- 在 VS2010 中的 Post Build 事件中将 bin 文件复制到物 2022-01-01
- 经典 Asp 中的 ResolveUrl/Url.Content 等效项 2022-01-01