Click here to Skip to main content
12,398,000 members (43,981 online)
Rate this:
 
Please Sign up or sign in to vote.
I want to create a clock on my ASP.NET page that display a time without refreshing the page
Posted 15-Sep-11 0:29am
Updated 17-Sep-11 0:53am
v2
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 3

Depending on what you are actually going to use it for, wouldn't a simple javascript timer work - see this[^] for example
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 8

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript">
        function TimeToShow() {
            var dt = new Date();            
            var la = document.getElementById("<%= Timer.ClientID %>");
             la.innerHTML = dt.toLocaleTimeString();
            window.setTimeout(TimeToShow, 1000);          
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <asp:label id="Timer" runat="server" text="Timer">
    <asp:button id="btnStart" runat="server" text="Start"/>    
    </div>
    </form>
</body>
</html>
  Permalink  
v2
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 4

You try this link

Only time In Asp.net[^]
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 6

By Jquery or Ajax u can show Time
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 12

Search as Convas control in w3school.com
lot of option are available on net....
  Permalink  
Comments
CHill60 21-Jul-15 5:34am
   
"lot of option are available on net...." - yes there are, including the other 7 solutions that were posted over 3 years ago. If you are not going to add useful information then I advise you to avoid answering old posts in this way

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160721.1 | Last Updated 21 Jul 2015
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100