使用服务器端的系统时间,客户端的时钟 [英] Client Side clock using server side system time

查看:88
本文介绍了使用服务器端的系统时间,客户端的时钟的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

林在.NET环境中工作,并在我的aspx页面我想补充一个正在运行的数字时钟W¯¯//秒,但我需要它来使用服务器端的时间。请告诉我这是最好的方法?

Im working in a .Net environment, and on my aspx page I would like to add a running digital clock w//seconds , but I need it to use the server side time. Whats the best approach for this?

谢谢!

推荐答案

你有没有考虑在AJAX的UpdatePanel?

Have you considered the AJAX UpdatePanel?

MSDN:教程:如何刷新UpdatePanel控件以固定的时间间隔

这可能是矫枉过正更新每一秒。也许实现它,使它轮询服务器,检查服务器和客户端时间仍同步时间,如果没有,更新客户端的网页?

It might be overkill to update every second. Maybe implement it so that it polls the server to check the server and the client times are still sync'd and if not, update the client page?

这篇关于使用服务器端的系统时间,客户端的时钟的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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