timer问题
前台页面不用timer控件,如何刷新?我从网上找了一些代码,指定1秒刷新一次,但是并没有实现...代码如下:
timer .net --------------------编程问答-------------------- javascript的定时啊 --------------------编程问答-------------------- 用js的setInterval与setTimeout --------------------编程问答--------------------
System.Timers.Timer Timers_Timer = new System.Timers.Timer();
Timers_Timer.Interval = 1000;
Timers_Timer.Enabled = true;
Response.Write(DateTime.Now.ToString());
--------------------编程问答--------------------
protected void Page_Load(object sender, EventArgs e)
{
ScriptManager sm = new ScriptManager();
form1.Controls.Add易做图;
Timer timer = new Timer();//System.Web.UI.Timer
timer.Interval = 1000;
timer.Tick += (s, ea) => { Response.Write(DateTime.Now.ToString()); };
timer.Enabled = true;
form1.Controls.Add(timer);
}
我主要是想写global里面的,先用aspx页面做测试
补充:.NET技术 , ASP.NET