Click here to Skip to main content
15,867,308 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
XML
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
     <script type="text/javascript">
         $(document).ready(function () {
             ShowTime();
         });
         function ShowTime() {
             var dt = new Date();
             document.getElementById("lblTime").innerHTML = dt.toLocaleTimeString();
             window.setTimeout("ShowTime()", 1000); // Here 1000(milliseconds) means one 1 Sec
         }
</script>

Output can show
=============
<label id="lblTime" style=" font-weight:bold"></label>


But can show this level
==============
<asp:label id="lblTime" runat="Server">

Output can not show
Posted
Comments
JR009 16-Jan-15 2:07am    
What are you trying to say? Do you want to set DateTime in asp:label control? Can u explain some more?
Sinisa Hajnal 16-Jan-15 2:38am    
This is a repost, I have already answered it in the other question (only variable was named differently)

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900