dotnetspider.com


 


TutorialsForumResourcesReviewsJobsInterviewVideosCommunitiesProjectsTraining

Subscribe to Subscribers


Online MembersSankar
Sunitha
Ashokkumar
er.g.ilango
Anu George
parameswaran
chanti
More...




Resources » Code Snippets » ASP.NET WebForms


Digital clock in asp.net using c# coding


Posted Date:     Category: ASP.NET WebForms    Rating: 1 out of 5
Author: Member Level: Silver    Points: 7 (Rs 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


Did you like this resource? Share it with your friends and show your love!





Responses to "Digital clock in asp.net using c# coding"
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


Author: Ninj    17 Mar 2010Member Level: Bronze   Points : 1
sir, I'm wondering.. is it possible to have this digital clock upon pressing the button? just like a time watch. I'm a having a hard time searching for tutorials about it.. But no luck.


Author: Ninj    17 Mar 2010Member Level: Bronze   Points : 1
sir, I'm wondering.. is it possible to have this digital clock upon pressing the button? just like a time watch. I'm a having a hard time searching for tutorials about it.. But no luck.


Feedbacks      

Post Comment:




  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:   Sign In to fill automatically.
    Email: (Will not be published, but required to validate comment)



    Type the numbers and letters shown on the left.


    Next Resource: Generate Msword Document using C#
    Previous Resource: Selected Index Changed - Redirect
    Return to Resources
    Post New Resource
    Category: ASP.NET WebForms


    Post resources and earn money!
     
    More Resources
    Popular Tags   Tag posting guidelines   Search Tags  
    Digital clock  .  Code  .  

    My Profile

    Active Members
    TodayLast 7 Daysmore...


    Awards & Gifts


    Email subscription
  • .NET Jobs
  • .NET Articles
  • .NET Forums
  • Articles Rss Feeds
    Forum Rss Feeds



    About Us    Trademark Disclaimer    Contact Us    Copyright    Privacy Policy    Terms Of Use    Revenue Sharing sites   Advertise   Talk to Tony John
    Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India
    2005 - 2012 All Rights Reserved.
    .NET and other trademarks mentioned in this site belong to Microsoft and other respective trademark owners.
    Articles, tutorials and all other content offered here is for educational purpose only.
    We are not associated with Microsoft or its partners.