如何在asp.net母版页中添加数字时钟。 [英] how to add digital clock in asp.net master page.
问题描述
如何在asp.net母版页中添加数字时钟。任何人都可以给我样品源代码。
我想添加我的申请。
谢谢
问候,
Manuel。
在asp.net中试试这个: -
< asp:ScriptManager ID = ScriptManager1 runat = 服务器 >
< / asp:ScriptManager >
< asp:UpdatePanel < span class =code-attribute> ID = UpdatePanel1 runat = 服务器 >
< ContentTemplate >
< asp:Timer ID = Timer1 runat = server 时间间隔 = 1000 >
< / asp:计时器 >
< asp:标签 ID = lblcurrenttime runat = server 文字 = > < / asp:Label >
< / ContentTemplate>
< / asp:UpdatePanel >
$ c $ b代码背后的代码: -
受保护 void Page_Load( object sender,EventArgs e)
{
System.Threading.Thread.Sleep( 100 ) ;
string currenttime = DateTime.Now.ToLongTimeString();
lblcurrenttime.Text = currenttime;
}
期望o / p: -
5:15:33 PM
如果你想要jquery数字时钟,请参阅: -
http://joaquinnunez.cl/jquery-clock-plugin/ [ ^ ]
http://www.aspdotnet-suresh.com/2013/04/8-best-jquery-clock-plugins-analog.html [ ^ ]
http://www.jquery4u.com/plugins/10-cool-jquery-clock -tutorials-analog-digital / [ ^ ]
参考
如何在主页上显示动态时钟 [ ^ ]
让我谷歌为你
Hi,
how to add digital clock in asp.net master page. can anyone give me sample source codes.
I want to add my application.
Thanks
Regards,
Manuel.
try this in asp.net:-
<asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:Timer ID="Timer1" runat="server" Interval="1000"> </asp:Timer> <asp:Label ID="lblcurrenttime" runat="server" Text=""></asp:Label> </ContentTemplate> </asp:UpdatePanel>
in code behind c# code:-
protected void Page_Load(object sender, EventArgs e) { System.Threading.Thread.Sleep(100); string currenttime = DateTime.Now.ToLongTimeString(); lblcurrenttime.Text = currenttime; }
desired o/p:-
5:15:33PM
If you want jquery digital clock then refer:-
http://joaquinnunez.cl/jquery-clock-plugin/[^]
http://www.aspdotnet-suresh.com/2013/04/8-best-jquery-clock-plugins-analog.html[^]
http://www.jquery4u.com/plugins/10-cool-jquery-clock-tutorials-analog-digital/[^]
Refer
how-to-show-a-dynamic-clock-on-master-page[^]
let me google that for you
这篇关于如何在asp.net母版页中添加数字时钟。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!