asp.net.ph

Server.MachineName Property

System.Web Namespace   HttpServerUtility Class


Gets the server's computer name.

[ VB ]
Public ReadOnly Property MachineName As String

[ C# ]
public string MachineName {get;}

[ C++ ]
public: __property String* get_MachineName ( );

[ JScript ]
public function get MachineName ( ) : String;

Property Value

The name of the local computer.

Exceptions


Exception Type Condition
HttpException Occurs when the computer name cannot be found.

Example

The following example shows the simplest way to retrieve and display the ApplicationPath for the current URL request.

<%= Server.MachineName %>

And which, for this page, returns the following:

PLESKPANEL

 Show me 

.NET Framework Security:


See Also

HttpServerUtility Members Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph