如何在asp.net母版页中添加数字时钟。 [英] how to add digital clock in asp.net master page.

查看:81
本文介绍了如何在asp.net母版页中添加数字时钟。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





如何在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屋!

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