C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Code Snippets » ASP.NET WebForms »

Digital clock in asp.net using c# coding


Posted Date: 24 Oct 2008    Resource Type: Code Snippets    Category: ASP.NET WebForms
Author: priyankaMember Level: Silver    
Rating: 1 out of 5Points: 7



This code shows how to build digital clock in C#

In ASP.NET page:-


<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 using C# code:-

protected void Page_Load(object sender, EventArgs e)
{
System.Threading.Thread.Sleep(100);
string currenttime = DateTime.Now.ToLongTimeString();
lblcurrenttime.Text = currenttime;
}


OUTPUT:-

Digital clock ex:- 5:15:33PM




Responses

Author: Prasanth Kumar S.D    28 Oct 2008Member Level: Gold   Points : 0
good stuff


Author: Himavanth    02 Feb 2009Member Level: Bronze   Points : 0
This is not a dynamic clock na...?


Author: arumugham    03 Feb 2009Member Level: Silver   Points : 0
super da......congrats...........9894150472


Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
Digital clock  .  Code  .    .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Generate Msword Document using C#
Previous Resource: Selected Index Changed - Redirect
Return to Discussion Resource Index
Post New Resource
Category: ASP.NET WebForms


Post resources and earn money!
 
More Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use