Click here to Skip to main content
Rate this: bad
good
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 1:29am
Edited 17-Sep-11 1:53am
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 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 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 9

Hi,
 
i got the solution in below link,You can get some idea from here
 
http://microsoftdotnetsolutions.blogspot.in/2012/12/display-time-in-aspnet-application.html[^]
  Permalink  
Comments
CHill60 at 10-Jul-13 9:44am
   
Question is nearly 2 years old with 4 5-star answers. Doesn't really need another solution that would come up in a google search anyway

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



Advertise | Privacy | Mobile
Web01 | 2.8.1411023.1 | Last Updated 10 Jul 2013
Copyright © CodeProject, 1999-2014
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