Click here to Skip to main content
11,581,510 members (64,650 online)
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 0:29am
Edited 17-Sep-11 0: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
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 10

  Permalink  
Comments
CHill60 at 14-Mar-15 10:41am
   
Adds nothing to the solutions that were posted over 3 years ago

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

  Print Answers RSS
0 OriginalGriff 340
1 Sergey Alexandrovich Kryukov 160
2 Frankie-C 105
3 RyanDev 84
4 virusstorm 84
0 OriginalGriff 1,273
1 Sergey Alexandrovich Kryukov 900
2 Abhinav S 617
3 F-ES Sitecore 500
4 Suvendu Shekhar Giri 433


Advertise | Privacy | Mobile
Web03 | 2.8.150603.1 | Last Updated 14 Mar 2015
Copyright © CodeProject, 1999-2015
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