Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
UserHostName Property

HttpRequest.UserHostName Property

Gets the DNS name of the remote client.

[Visual Basic]
Public ReadOnly Property UserHostName As String
public string UserHostName {get;}
public: __property String* get_UserHostName();
public function get UserHostName() : String;

Property Value

The DNS name of the remote client.


The following example assigns the DNS name of the remote client to a string variable.

[Visual Basic] 
Dim ClientName As String
 ClientName = Request.UserHostName

String ClientName;
 ClientName = Request.UserHostName;

String* ClientName;
 ClientName = Request->UserHostName;

var ClientName : String = Request.UserHostName


Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

See Also

HttpRequest Class | HttpRequest Members | System.Web Namespace

© 2015 Microsoft