3分钟后,如何使用计时器控制到我的网页.它会自动刷新 [英] How to use timer contorl to my web page that after 3 min. it will refresh automatically

查看:93
本文介绍了3分钟后,如何使用计时器控制到我的网页.它会自动刷新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,
我想每3分钟对我的网页使用一个计时器控件.该页面将自动刷新.或者有什么方法可以让我在3分钟后刷新页面.
请帮帮我.
谢谢.

Hello,
I want To use a timer control to my web page that each 3 min. the page will be refresh automatically. Or is there any way that I can refresh my page after 3 min.
Please help me.
thanks.

推荐答案

尝试使用

Try to use

<asp:scriptmanager id="ScriptManager1" runat="server" >
<asp:timer id="Timer1" interval="xxx" runat="server" >



间隔(XXX)以毫秒为单位.在3分钟内,其180000



Interval(XXX) is in milliseconds .for 3 minutes its 180000


这将完成该操作
This will do it
Response.Redirect(Request.RawUrl); 


除了javascript解决方案之外,您还可以在页面的页眉部分添加一个meta部分,并强制其每180秒刷新一次:

In addition to javascript solutions you can simply add a meta part to the header part of your page and force it to refresh in every 180 seconds :

<head>
    <meta http-equiv="refresh" content="180;url=test.aspx" />
</head>



test.aspx 更改为要从客户端每3分钟刷新一次的Web窗体.

希望对您有帮助



Change the test.aspx to the webform that you want to be refreshed every 3 minutes from the client side.

Hope It Helps


这篇关于3分钟后,如何使用计时器控制到我的网页.它会自动刷新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆