Javascript to display time on Web page
Javascript to display continuous time on the Web page. By continuous it means that it will be displayed second by second.
<script type="text/javascript">
function ShowTime()
{
var dt = new Date();
document.getElementById("<%= TextBox1.ClientID %>").value = dt.toLocaleTimeString();
window.setTimeout("ShowTime()", 1000);
}
</script>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
If you are using normal Webform then it can be called on Body load event. If you are using MasterPage then it can be called within ContentTemplate at the end afte all the controls will be rendered.
Revision number 1, Saturday, February 16, 2008 5:45:41 AM by
This is not the most up to date version of this article. The most recent version can be found here.
You must Login to comment.
Revision #7
Sat, Sep 20, 2008 6:33 PM
by
|
Visual Studio 2008
Visual Studio 2008is theversion of Visual Studio which comes with the .NET Framework 3.5. It was released to MSDN subscribers on 19 November 2007 alongside the.NET Framework 3.5. Visual Studio 2008 can target developmentin .NET Framework versions 2.0, 3.0
|
Revision #2
Thu, Mar 13, 2008 4:54 AM
by
|
Javascript to add bookmark option on your website
If it is required to add a facility on the webpage that users can click a button on the website and it will open up bookmark option. Following is the code that will perform this task. html>body>SCRIPT LANGUAGE="JavaScript"> function bookmark
|
Revision #3
Wed, May 28, 2008 3:16 PM
by
|
Check/Uncheck checkboxes in GridView using JavaScript
Thequestion regarding how to check/uncheck CheckBoxes within a GridView control using JavaScript has been asked many times. Hereis aquick reference you can follow. Firstwe havethe .aspx markup. script type="text/javascript"> function SelectAll
|