Search - Articles
DevASP.NET for ASP.NET, VB.NET, XML and C# (C-Sharp) Developers Tuesday, March 03, 2009
Dev Articles
Search Directory
SQL Server

Display Dynamic Current Date And Time in the Title Bar of Web Page

Author: DevASP
Download Source Code :

This article is about how you can display current date time in the title bar of you IE when your web page is opened.

  • Steps you will do. 
  • Start visual studio and create a new web application. 
  • Drop a label control on the web form and set its following properties. 
Text = “See the title bar of this window”
  • Now open the HTML design of you web page and before closing the head tag add the following JavaScript tag and JavaScript function.

<script language="JavaScript">



 function doTheClock() {

      window.setTimeout( "doTheClock()", 1000 );

      t = new Date();

      if(document.all || document.getElementById){

         document.title = t.toString();



         self.status = t.toString();








Now run you web application and see the title of your web page it will show you the current data and time dynamically.



Add Article Comment:
Name :
Email Address :
Comments :
<< Navigating an ASP.Net Page

Disclaimer - Privacy
© 2002-2017