Home  |  Index  |  Dotnet4all Snippets  |  Submit resources
About  |  Mail us  
Dotnet4all Logo
How to display the uptime of your (web) server (Thursday, August 19, 2004)
 
Determine the uptime of your (web) server

In just one line of code show your public how long your (web) server has been up and running.

Create an empty web form and place a default button and a label on it. In the click event of the button specify this line of code.

'VB
Label1.Text = (Environment.TickCount / 1000).ToString & " seconds"

This will show the uptime of your server in seconds.


Posted by Xander Zelders



 
Previous Posts
    - Howto convert a sqlDataReader into a DataTable
    - How to use the stringbuilder class
    - How to display a byte as a Hex number in C#
    - How to extract the time part from a DateTime datat...
    - How to replace a line feed in a string with a <BR>...
    - How to get the content of an ASCII file into a tex...
    - How to read the content of an external website in ...
    - How to late bind an object, using the 'old' Prog.I...
    - How to parse an ASP.NET page.
    - How to determine wether a string fits in a textbox...

Archives
    - 08/01/2004 - 08/08/2004
    - 08/08/2004 - 08/15/2004
    - 08/15/2004 - 08/22/2004
    - 08/22/2004 - 08/29/2004
    - 08/29/2004 - 09/05/2004
    - 09/05/2004 - 09/12/2004
    - 09/12/2004 - 09/19/2004
    - 09/19/2004 - 09/26/2004
    - 09/26/2004 - 10/03/2004
    - 10/03/2004 - 10/10/2004
    - 01/02/2005 - 01/09/2005
    - 01/09/2005 - 01/16/2005
    - 01/30/2005 - 02/06/2005
    - 01/01/2006 - 01/08/2006


Disclaimer & Terms of Use  | DotNet4All.Com concept & © 2004 - 2007 by  Zelders²  - Holland