开发者

update time continuously on asp.mvc

I am having a asp.mvc file and in its S开发者_运维技巧ite.Master page, I want to update the time continuously. Here is the code I wrote.

<asp:Label ID="DateTimeLabel" runat="server" Text=""><%= DateTime.Now.ToString()%></asp:Label>

Can anyone tell me how to change the time continuously(I don't have background code i.e. code behind file)? Thank you.


Whether you're using WebForms or MVC this would probably better done with client side Javascript. See this article for a how to. Here's an even simpler implementation with a running example.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜