简体   繁体   English

从ASP.NET到MVC Razor的计时器

[英]Timers from ASP.NET to MVC Razor

I'm moving an app from ASP.NET/C# to MVC and I have some Timers <asp:Timer> I'm trying to find exactly the same tool for MVC ( Html5 or DevExpress ) but seems like there is not or at least my intellisense doesn't show it. 我正在将一个应用程序从ASP.NET / C#移动到MVC,我有一些Timers <asp:Timer>我正在尝试为MVC( Html5DevExpress )找到完全相同的工具但似乎没有或至少我的intellisense没有显示它。

Anyone knows about it and can post the squema of it? 任何人都知道它,并可以发布它的squema?

You will need to use Javascript yourself. 您需要自己使用Javascript。

Take a look at window.setInterval() or one of the many jQuery timers. 看看window.setInterval()或许多jQuery计时器之一。

Another option, that doesn't involve javascript is the HTML META tag. 另一个不涉及javascript的选项是HTML META标记。

example: 例:
<meta http-equiv="refresh" content="30">

content is specified in seconds . 内容以为单位指定。 META elements live within the HEAD element. META元素存在于HEAD元素中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM