Tag Archives: ASP.NET

Code Snippet: How to get client machine name?

I had a requirement to get client’s machine name   using smartpart user control in sharepoint . i have tried number of methods but unfortunately those show server name only.

here  is the code which works fine.

Dim host As  System.Net.IPHostEntry

host = System.Net.Dns.GetHostEntry(Request.ServerVariables.Item(“REMOTE_HOST”)) 

Dim strComputerName As String = host.HostName

label1.text= strComputerName

1 Comment

Posted by on April 15, 2009 in ASP.NET, Code Snippets, Tips & Tricks


Tags: , ,