大佬教程收集整理的这篇文章主要介绍了asp.net – 每5秒自动刷新一次Updatepanel,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
>这是每5秒在我的页面上反映新行项目计数的正确方法吗?
>从长远来看,这会降低我的应用程序性能吗?
通过不断刷新更新面板的方式.
我的标签是从我的代码隐藏的ExecuteReader查询中获取其值.
这是一个间隔的例子:
HTML标记:
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager> <asp:updatePanel runat="server" updateMode="Conditional"> <ContentTemplate> <!-- your controls in panel --> </ContentTemplate> <@R_197_10296@gers> <asp:AsyncPostBACk@R_197_10296@ger ControlID="Timer1" EventName="Tick" /> </@R_197_10296@gers> </asp:updatePanel> <asp:Timer ID="Timer1" runat="server" Interval="5000" OnTick="Timer1_Tick"></asp:Timer>
代码隐藏:
protected void Timer1_Tick(object sender,EventArgs E) { // your stuff to refresh after somE interval }
以上是大佬教程为你收集整理的asp.net – 每5秒自动刷新一次Updatepanel全部内容,希望文章能够帮你解决asp.net – 每5秒自动刷新一次Updatepanel所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。